From: Andrew Dolgov Date: Tue, 9 Oct 2012 15:23:11 +0000 (+0400) Subject: API: support comments count/url X-Git-Tag: 1.6.0~13 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ff0ff5f064f1b3ec204754f61b5073fa476643fa;p=tt-rss.git API: support comments count/url --- diff --git a/include/functions.php b/include/functions.php index 0231c52d..1970dcd6 100644 --- a/include/functions.php +++ b/include/functions.php @@ -4647,6 +4647,12 @@ $headline_row["feed_title"] = $line["feed_title"]; + if (!$line["comments"] && $line["num_comments"] > 0) + $line["comments"] = $line["link"]; + + $headline_row["comments_count"] = (int)$line["num_comments"]; + $headline_row["comments_link"] = $line["comments"]; + array_push($headlines, $headline_row); }