summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
authorJustAMacUser <[email protected]>2021-01-10 03:23:16 -0500
committerJustAMacUser <[email protected]>2021-01-10 03:23:16 -0500
commitfadf4dec96a81b03bd38136c4cdaae9ba4c8aae6 (patch)
treeb94f410ac225a3f507ca2fb110e8906f675fdd56 /classes/handler/public.php
parent219b493550b5abf6715825980ec692d6776f9070 (diff)
Include tags for HOOK_ARTICLE_EXPORT_FEED.
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index 86a82cc61..30f021cd7 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -82,6 +82,7 @@ class Handler_Public extends Handler {
while ($line = $result->fetch()) {
$line["content_preview"] = Sanitizer::sanitize(truncate_string(strip_tags($line["content"]), 100, '...'));
+ $line["tags"] = Article::get_article_tags($line["id"], $owner_uid);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line);
@@ -121,9 +122,7 @@ class Handler_Public extends Handler {
$tpl->setVariable('ARTICLE_SOURCE_LINK', htmlspecialchars($line['site_url'] ? $line["site_url"] : get_self_url_prefix()), true);
$tpl->setVariable('ARTICLE_SOURCE_TITLE', htmlspecialchars($line['feed_title'] ? $line['feed_title'] : $feed_title), true);
- $tags = Article::get_article_tags($line["id"], $owner_uid);
-
- foreach ($tags as $tag) {
+ foreach ($line["tags"] as $tag) {
$tpl->setVariable('ARTICLE_CATEGORY', htmlspecialchars($tag), true);
$tpl->addBlock('category');
}
@@ -181,6 +180,7 @@ class Handler_Public extends Handler {
while ($line = $result->fetch()) {
$line["content_preview"] = Sanitizer::sanitize(truncate_string(strip_tags($line["content_preview"]), 100, '...'));
+ $line["tags"] = Article::get_article_tags($line["id"], $owner_uid);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 100);
@@ -202,12 +202,10 @@ class Handler_Public extends Handler {
if ($line['note']) $article['note'] = $line['note'];
if ($article['author']) $article['author'] = $line['author'];
- $tags = Article::get_article_tags($line["id"], $owner_uid);
-
- if (count($tags) > 0) {
+ if (count($line["tags"]) > 0) {
$article['tags'] = array();
- foreach ($tags as $tag) {
+ foreach ($line["tags"] as $tag) {
array_push($article['tags'], $tag);
}
}