Skip to content

Commit

Permalink
fix missing more replies on topics with no replies
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Jul 9, 2013
1 parent a946cc9 commit fa56f96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$permalink = (string)$custom['discourse_permalink'][0];
$discourse_url_name = preg_replace("(https?://)", "", $options['url'] );
$discourse_info = json_decode($custom['discourse_comments_raw'][0]);
$more_replies = $discourse_info->filtered_posts_count - count($discourse_info->posts) - 1;
$more_replies = $discourse_info->posts_count - count($discourse_info->posts) - 1;
$show_fullname = $options['use-fullname-in-comments'] == 1;
$comments_title = $options['custom-comments-title'];
if(!$comments_title || strlen(trim($comments_title)) == 0) {
Expand All @@ -20,7 +20,8 @@
$more_replies = $more_replies . " " . $more . "replies";
}

$link_text = count($discourse_info->filtered_posts_count - 1) == 0 ? "Start the discussion" : "Continue the discussion";
$link_text = count($discourse_info->posts_count - 1) == 0 ? "Start the discussion" : "Continue the discussion";

?>

<div id="comments">
Expand Down

0 comments on commit fa56f96

Please sign in to comment.