diff options
-rw-r--r-- | classes/api.php | 8 | ||||
-rw-r--r-- | include/functions.php | 2 | ||||
-rw-r--r-- | include/rssfuncs.php | 8 |
3 files changed, 12 insertions, 6 deletions
diff --git a/classes/api.php b/classes/api.php index c2b7f2a8e..badd0b564 100644 --- a/classes/api.php +++ b/classes/api.php @@ -309,7 +309,7 @@ class API extends Handler { $query = "SELECT id,title,link,content,cached_content,feed_id,comments,int_id, marked,unread,published,score, ".SUBSTRING_FOR_DATE."(updated,1,16) as updated, - author + author,(SELECT title FROM ttrss_feeds WHERE id = feed_id) AS feed_title FROM ttrss_entries,ttrss_user_entries WHERE id IN ($article_id) AND ref_id = id AND owner_uid = " . $_SESSION["uid"] ; @@ -338,7 +338,8 @@ class API extends Handler { "content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"], "feed_id" => $line["feed_id"], "attachments" => $attachments, - "score" => (int)$line["score"] + "score" => (int)$line["score"], + "feed_title" => $line["feed_title"] ); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) { @@ -684,7 +685,8 @@ class API extends Handler { $headline_row["labels"] = $labels; - $headline_row["feed_title"] = $line["feed_title"]; + $headline_row["feed_title"] = $line["feed_title"] ? $line["feed_title"] : + $feed_title; $headline_row["comments_count"] = (int)$line["num_comments"]; $headline_row["comments_link"] = $line["comments"]; diff --git a/include/functions.php b/include/functions.php index f1e78dfb7..6337dbbde 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3437,7 +3437,7 @@ function format_article_labels($labels, $id) { - if (is_array($labels)) return ''; + if (!is_array($labels)) return ''; $labels_str = ""; diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 3c7716721..0ecab6a25 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1271,8 +1271,12 @@ $match = @preg_match("/$reg_exp/i", $author); break; case "tag": - $tag_string = join(",", $tags); - $match = @preg_match("/$reg_exp/i", $tag_string); + foreach ($tags as $tag) { + if (@preg_match("/$reg_exp/i", $tag)) { + $match = true; + break; + } + } break; } |