]> git.wh0rd.org - tt-rss.git/commitdiff
API: support comments count/url
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 9 Oct 2012 15:23:11 +0000 (19:23 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 9 Oct 2012 15:23:11 +0000 (19:23 +0400)
include/functions.php

index 0231c52de87920b7c99113e5ff96266a3a38df2b..1970dcd60701686bd3310ea8ec694d1be6ab1329 100644 (file)
 
                                $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);
                        }