From 891e36f57e2e3955a4f13019e8fdc58fce826434 Mon Sep 17 00:00:00 2001 From: justauser Date: Thu, 27 Jun 2013 11:18:23 -0400 Subject: [PATCH 1/8] Changes to add a new hook: HOOK_QUERY_HEADLINES. An example is provided. --- classes/api.php | 21 ++++++++++---- classes/feeds.php | 16 +++++++---- classes/handler/public.php | 22 +++++++++++---- classes/pluginhost.php | 1 + classes/pref/filters.php | 9 ++++-- include/functions.php | 10 ++----- plugins/query_headlines/init.js | 0 plugins/query_headlines/init.php | 47 ++++++++++++++++++++++++++++++++ 8 files changed, 101 insertions(+), 25 deletions(-) create mode 100644 plugins/query_headlines/init.js create mode 100644 plugins/query_headlines/init.php diff --git a/classes/api.php b/classes/api.php index 23866072f..139a486ee 100644 --- a/classes/api.php +++ b/classes/api.php @@ -636,8 +636,13 @@ class API extends Handler { $feed_title = $qfh_ret[1]; $headlines = array(); - + while ($line = db_fetch_assoc($result)) { + + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 100, true); + } + $is_updated = ($line["last_read"] == "" && ($line["unread"] != "t" && $line["unread"] != "1")); @@ -664,24 +669,27 @@ class API extends Handler { $headline_row['attachments'] = get_article_enclosures( $line['id']); - if ($show_excerpt) { - $excerpt = truncate_string(strip_tags($line["content_preview"]), 100); + if ($show_excerpt ){ + if(isset($line["modified_preview"])) + $excerpt = strip_tags($line["content_preview"]); + else + $excerpt = truncate_string(strip_tags($line["content_preview"]), 100); $headline_row["excerpt"] = $excerpt; } if ($show_content) { if ($line["cached_content"] != "") { - $line["content_preview"] =& $line["cached_content"]; + $line["content"] =& $line["cached_content"]; } if ($sanitize_content) { $headline_row["content"] = sanitize( - $line["content_preview"], + $line["content"], sql_bool_to_bool($line['hide_images']), false, $line["site_url"]); } else { - $headline_row["content"] = $line["content_preview"]; + $headline_row["content"] = $line["content"]; } } @@ -699,6 +707,7 @@ class API extends Handler { $headline_row["always_display_attachments"] = sql_bool_to_bool($line["always_display_enclosures"]); $headline_row["author"] = $line["author"]; + $headline_row["score"] = (int)$line["score"]; foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) { diff --git a/classes/feeds.php b/classes/feeds.php index 83736925c..fd4c7fe53 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -288,6 +288,9 @@ class Feeds extends Handler_Protected { $expand_cdm = get_pref('CDM_EXPANDED'); while ($line = $this->dbh->fetch_assoc($result)) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 250); + } $id = $line["id"]; $feed_id = $line["feed_id"]; $label_cache = $line["label_cache"]; @@ -360,9 +363,12 @@ class Feeds extends Handler_Protected { $date_entered_fmt = T_sprintf("Imported at %s", make_local_datetime($line["date_entered"], false)); - if (get_pref('SHOW_CONTENT_PREVIEW')) { - $content_preview = truncate_string(strip_tags($line["content_preview"]), - 250); + if (get_pref('SHOW_CONTENT_PREVIEW') ) { + if(isset($line["modified_preview"])) + $content_preview = strip_tags($line["content_preview"]); + else + $content_preview = truncate_string(strip_tags($line["content_preview"]), + 250); } $score = $line["score"]; @@ -502,7 +508,7 @@ class Feeds extends Handler_Protected { else $tags = false; - $line["content"] = sanitize($line["content_preview"], + $line["content"] = sanitize($line["content"], sql_bool_to_bool($line['hide_images']), false, $entry_site_url); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_CDM) as $p) { @@ -575,7 +581,7 @@ class Feeds extends Handler_Protected { $excerpt_hidden = "style=\"display : none\""; $reply['content'] .= " - $content_preview"; + id=\"CEXC-$id\" class=\"cdmExcerpt\"> -" . $content_preview . ""; $reply['content'] .= ""; if (!get_pref('VFEED_GROUP_BY_FEED')) { diff --git a/classes/handler/public.php b/classes/handler/public.php index f05beafd2..825ea5e2e 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -87,14 +87,20 @@ class Handler_Public extends Handler { $tpl->setVariable('SELF_URL', htmlspecialchars(get_self_url_prefix()), true); while ($line = $this->dbh->fetch_assoc($result)) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line); + } $tpl->setVariable('ARTICLE_ID', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_LINK', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_TITLE', htmlspecialchars($line['title']), true); - $tpl->setVariable('ARTICLE_EXCERPT', - truncate_string(strip_tags($line["content_preview"]), 100, '...'), true); + if(isset($line["modified_preview"])) + $tpl->setVariable('ARTICLE_EXCERPT', strip_tags($line["content_preview"]), true); + else + $tpl->setVariable('ARTICLE_EXCERPT', + truncate_string(strip_tags($line["content_preview"]), 100, '...'), true); - $content = sanitize($line["content_preview"], false, $owner_uid); + $content = sanitize($line["content"], false, $owner_uid); if ($line['note']) { $content = "
Article note: " . $line['note'] . "
" . @@ -164,13 +170,19 @@ class Handler_Public extends Handler { $feed['articles'] = array(); while ($line = $this->dbh->fetch_assoc($result)) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 100); + } $article = array(); $article['id'] = $line['link']; $article['link'] = $line['link']; $article['title'] = $line['title']; - $article['excerpt'] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); - $article['content'] = sanitize($line["content_preview"], false, $owner_uid); + if(isset($line["modified_preview"])) + $article['excerpt'] = strip_tags($line["content_preview"]); + else + $article['excerpt'] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); + $article['content'] = sanitize($line["content"], false, $owner_uid); $article['updated'] = date('c', strtotime($line["updated"])); if ($line['note']) $article['note'] = $line['note']; diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 53adf01f9..a1bd1b364 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -37,6 +37,7 @@ class PluginHost { const HOOK_PREFS_EDIT_FEED = 20; const HOOK_PREFS_SAVE_FEED = 21; const HOOK_FETCH_FEED = 22; + const HOOK_QUERY_HEADLINES = 23; const KIND_ALL = 1; const KIND_SYSTEM = 2; diff --git a/classes/pref/filters.php b/classes/pref/filters.php index bcc7b5aec..099c88252 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -97,12 +97,17 @@ class Pref_Filters extends Handler_Protected { print ""; while ($line = $this->dbh->fetch_assoc($result)) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 100); + } $entry_timestamp = strtotime($line["updated"]); $entry_tags = get_article_tags($line["id"], $_SESSION["uid"]); - $content_preview = truncate_string( - strip_tags($line["content_preview"]), 100, '...'); + if(isset($line["modified_preview"])) + $content_preview = strip_tags($line["content_preview"]); + else + $content_preview = truncate_string(strip_tags($line["content_preview"]), 100, '...'); if ($line["feed_title"]) $feed_title = $line["feed_title"]; diff --git a/include/functions.php b/include/functions.php index 355eec2cd..eb011b6db 100644 --- a/include/functions.php +++ b/include/functions.php @@ -71,7 +71,6 @@ "hu_HU" => "Magyar (Hungarian)", "it_IT" => "Italiano", "ja_JP" => "日本語 (Japanese)", - "ko_KR" => "한국어 (Korean)", "lv_LV" => "Latviešu", "nb_NO" => "Norwegian bokmål", "nl_NL" => "Dutch", @@ -1059,7 +1058,7 @@ $date_qpart = "date_entered < DATE_SUB(NOW(), INTERVAL 1 WEEK) "; } break; - case "2week": + case "2weeks": if (DB_TYPE == "pgsql") { $date_qpart = "date_entered < NOW() - INTERVAL '2 week' "; } else { @@ -2579,7 +2578,7 @@ } } - $content_query_part = "content as content_preview, cached_content, "; + $content_query_part = "content, content AS content_preview, cached_content, "; if (is_numeric($feed)) { @@ -2750,13 +2749,10 @@ if ($site_url) { - if ($entry->hasAttribute('href')) { + if ($entry->hasAttribute('href')) $entry->setAttribute('href', rewrite_relative_url($site_url, $entry->getAttribute('href'))); - $entry->setAttribute('rel', 'noreferrer'); - } - if ($entry->hasAttribute('src')) { $src = rewrite_relative_url($site_url, $entry->getAttribute('src')); diff --git a/plugins/query_headlines/init.js b/plugins/query_headlines/init.js new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/query_headlines/init.php b/plugins/query_headlines/init.php new file mode 100644 index 000000000..2c8a402c2 --- /dev/null +++ b/plugins/query_headlines/init.php @@ -0,0 +1,47 @@ +host = $host; + $host->add_hook($host::HOOK_QUERY_HEADLINES, $this); + } + + // passes in the array for an item + // second argument is the length of the preview the caller is using + // create a key called "modified_preview" if you change the preview and don't want + // caller to override with their default + + function hook_query_headlines($line, $preview_length = 100,$api_call=false) { + //make the author field empty + $line["author"] = ""; + + // and toss tags, since I don't use + $line["tag_cache"] = ""; + return $line; + + + } + + + function api_version() { + return 2; + } + +} +?> From 0708046b4f0c3f430258f561dbc1a51ed5d92888 Mon Sep 17 00:00:00 2001 From: justauser Date: Thu, 27 Jun 2013 12:01:57 -0400 Subject: [PATCH 2/8] change for HOOK_QUERY_HEADLINES. See example for details. --- classes/feeds.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index 85276a4b1..409824f96 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -363,15 +363,12 @@ class Feeds extends Handler_Protected { $date_entered_fmt = T_sprintf("Imported at %s", make_local_datetime($line["date_entered"], false)); -# if (get_pref('SHOW_CONTENT_PREVIEW') ) { -# if(isset($line["modified_preview"])) -# $content_preview = strip_tags($line["content_preview"]); -# else -# $content_preview = truncate_string(strip_tags($line["content_preview"]), -# 250); - if (get_pref('SHOW_CONTENT_PREVIEW')) { - $content_preview = " — " . truncate_string(strip_tags($line["content_preview"]), - 250); + if (get_pref('SHOW_CONTENT_PREVIEW') ) { + if(isset($line["modified_preview"])) + $content_preview = " — " . strip_tags($line["content_preview"]); + else + $content_preview = " — " . truncate_string(strip_tags($line["content_preview"]), + 250); } $score = $line["score"]; From 2e188438456314d4cffab67c6a0baddb0b364b05 Mon Sep 17 00:00:00 2001 From: justauser Date: Thu, 27 Jun 2013 12:21:14 -0400 Subject: [PATCH 3/8] one more change to merge to origin --- classes/feeds.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index 409824f96..b0447fd25 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -580,12 +580,8 @@ class Feeds extends Handler_Protected { else $excerpt_hidden = "style=\"display : none\""; - $reply['content'] .= " -" . $content_preview . ""; -======= - id=\"CEXC-$id\" class=\"cdmExcerpt\">$content_preview"; ->>>>>>> origin + $reply['content'] .= "$content_preview"; + $reply['content'] .= ""; if (!get_pref('VFEED_GROUP_BY_FEED')) { From 67631438353273ea260be518e627bc25500e01f2 Mon Sep 17 00:00:00 2001 From: justauser Date: Fri, 28 Jun 2013 10:46:45 -0400 Subject: [PATCH 4/8] Changed the implementation of HOOK_QUERY_HEADLINES to deal with issue Fox raised --- classes/api.php | 11 +++-------- classes/feeds.php | 15 +++++---------- classes/handler/public.php | 14 ++++---------- classes/pref/filters.php | 9 +++------ 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/classes/api.php b/classes/api.php index 139a486ee..aa092df78 100644 --- a/classes/api.php +++ b/classes/api.php @@ -638,7 +638,7 @@ class API extends Handler { $headlines = array(); while ($line = db_fetch_assoc($result)) { - + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { $line = $p->hook_query_headlines($line, 100, true); } @@ -669,13 +669,8 @@ class API extends Handler { $headline_row['attachments'] = get_article_enclosures( $line['id']); - if ($show_excerpt ){ - if(isset($line["modified_preview"])) - $excerpt = strip_tags($line["content_preview"]); - else - $excerpt = truncate_string(strip_tags($line["content_preview"]), 100); - $headline_row["excerpt"] = $excerpt; - } + if (!$show_excerpt ) + $headline_row["excerpt"] = $ine["content_preview"]; if ($show_content) { diff --git a/classes/feeds.php b/classes/feeds.php index b0447fd25..44af9ae0b 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -286,8 +286,9 @@ class Feeds extends Handler_Protected { if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info); $expand_cdm = get_pref('CDM_EXPANDED'); - + while ($line = $this->dbh->fetch_assoc($result)) { + $line["content_preview"] = "— " . truncate_string(strip_tags($line["content_preview"]),250); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { $line = $p->hook_query_headlines($line, 250); } @@ -364,11 +365,7 @@ class Feeds extends Handler_Protected { make_local_datetime($line["date_entered"], false)); if (get_pref('SHOW_CONTENT_PREVIEW') ) { - if(isset($line["modified_preview"])) - $content_preview = " — " . strip_tags($line["content_preview"]); - else - $content_preview = " — " . truncate_string(strip_tags($line["content_preview"]), - 250); + $content_preview = $line["content_preview"]; } $score = $line["score"]; @@ -461,9 +458,7 @@ class Feeds extends Handler_Protected { truncate_string($line["title"], 200); if (get_pref('SHOW_CONTENT_PREVIEW')) { - if ($content_preview) { - $reply['content'] .= "$content_preview"; - } + $reply['content'] .= "" . $line["content_preview"] . ""; } $reply['content'] .= ""; @@ -580,7 +575,7 @@ class Feeds extends Handler_Protected { else $excerpt_hidden = "style=\"display : none\""; - $reply['content'] .= "$content_preview"; + $reply['content'] .= "" . $line["content_preview"] . ""; $reply['content'] .= ""; diff --git a/classes/handler/public.php b/classes/handler/public.php index 825ea5e2e..08f35e212 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -85,7 +85,7 @@ class Handler_Public extends Handler { } $tpl->setVariable('SELF_URL', htmlspecialchars(get_self_url_prefix()), true); - + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); while ($line = $this->dbh->fetch_assoc($result)) { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { $line = $p->hook_query_headlines($line); @@ -94,11 +94,7 @@ class Handler_Public extends Handler { $tpl->setVariable('ARTICLE_ID', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_LINK', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_TITLE', htmlspecialchars($line['title']), true); - if(isset($line["modified_preview"])) - $tpl->setVariable('ARTICLE_EXCERPT', strip_tags($line["content_preview"]), true); - else - $tpl->setVariable('ARTICLE_EXCERPT', - truncate_string(strip_tags($line["content_preview"]), 100, '...'), true); + $tpl->setVariable('ARTICLE_EXCERPT', $line["content_preview"], true); $content = sanitize($line["content"], false, $owner_uid); @@ -170,6 +166,7 @@ class Handler_Public extends Handler { $feed['articles'] = array(); while ($line = $this->dbh->fetch_assoc($result)) { + $line["content_preview"]] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { $line = $p->hook_query_headlines($line, 100); } @@ -178,10 +175,7 @@ class Handler_Public extends Handler { $article['id'] = $line['link']; $article['link'] = $line['link']; $article['title'] = $line['title']; - if(isset($line["modified_preview"])) - $article['excerpt'] = strip_tags($line["content_preview"]); - else - $article['excerpt'] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); + $article['excerpt'] = $line["content_preview"]; $article['content'] = sanitize($line["content"], false, $owner_uid); $article['updated'] = date('c', strtotime($line["updated"])); diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 63318033e..5d19a5556 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -95,7 +95,7 @@ class Pref_Filters extends Handler_Protected { print "
"; print "
"; - + $line["content_preview"] = strip_tags($line["content_preview"]), 100, '...'); while ($line = $this->dbh->fetch_assoc($result)) { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { $line = $p->hook_query_headlines($line, 100); @@ -104,10 +104,7 @@ class Pref_Filters extends Handler_Protected { $entry_timestamp = strtotime($line["updated"]); $entry_tags = get_article_tags($line["id"], $_SESSION["uid"]); - if(isset($line["modified_preview"])) - $content_preview = strip_tags($line["content_preview"]); - else - $content_preview = truncate_string(strip_tags($line["content_preview"]), 100, '...'); + $content_preview = $line["content_preview"]; if ($line["feed_title"]) $feed_title = $line["feed_title"]; @@ -123,7 +120,7 @@ class Pref_Filters extends Handler_Protected { print " ("; print "" . $feed_title . ""; print "): "; - print "" . $content_preview . ""; + print "" . $line["content_preview"] . ""; print " " . mb_substr($line["date_entered"], 0, 16); print ""; From 48c8e72008c01513985b53135297366b80b5b1f4 Mon Sep 17 00:00:00 2001 From: justauser Date: Fri, 28 Jun 2013 10:50:30 -0400 Subject: [PATCH 5/8] Add some explanaiton in the example about the content_preview field --- plugins/query_headlines/init.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/query_headlines/init.php b/plugins/query_headlines/init.php index 2c8a402c2..5d71d0356 100644 --- a/plugins/query_headlines/init.php +++ b/plugins/query_headlines/init.php @@ -6,6 +6,9 @@ class Query_Headlines extends Plugin { // - the array of elements that are returned by queryFeedHeadlines // - the length that the caller wants to truncate the content preview to // - a boolean that indicates if the caller is from an API call + // The field content_preview has been shortened and sanitized, as appropriate + // before the plugin is called. If you want to do your own preview handling + // use the content field and create the preview from that //NOTE:**** You have to make this a system plugin if you want it to also work // on API calls. If you just make it a user plugin it will work on web page output // but not on API calls From 575a52874c8ebb0bcd5741009cc143389ea2279e Mon Sep 17 00:00:00 2001 From: justauser Date: Sat, 29 Jun 2013 03:11:38 -0400 Subject: [PATCH 6/8] fixed a typo --- classes/handler/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/handler/public.php b/classes/handler/public.php index 08f35e212..810f4c034 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -166,7 +166,7 @@ class Handler_Public extends Handler { $feed['articles'] = array(); while ($line = $this->dbh->fetch_assoc($result)) { - $line["content_preview"]] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { $line = $p->hook_query_headlines($line, 100); } From 47fecba235400e0d7a5a7c54c9ff201c0840deec Mon Sep 17 00:00:00 2001 From: justauser Date: Sun, 7 Jul 2013 13:53:23 -0400 Subject: [PATCH 7/8] changes to add hook_query_headlines --- classes/pluginhost.php | 1 + include/functions.php | 2 +- plugins/query_headlines/init.js | 0 plugins/query_headlines/init.php | 50 ++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 plugins/query_headlines/init.js create mode 100644 plugins/query_headlines/init.php diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 53adf01f9..a1bd1b364 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -37,6 +37,7 @@ class PluginHost { const HOOK_PREFS_EDIT_FEED = 20; const HOOK_PREFS_SAVE_FEED = 21; const HOOK_FETCH_FEED = 22; + const HOOK_QUERY_HEADLINES = 23; const KIND_ALL = 1; const KIND_SYSTEM = 2; diff --git a/include/functions.php b/include/functions.php index 355eec2cd..397605c5a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2579,7 +2579,7 @@ } } - $content_query_part = "content as content_preview, cached_content, "; + $content_query_part = "content, content as content_preview, cached_content, "; if (is_numeric($feed)) { diff --git a/plugins/query_headlines/init.js b/plugins/query_headlines/init.js new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/query_headlines/init.php b/plugins/query_headlines/init.php new file mode 100644 index 000000000..5d71d0356 --- /dev/null +++ b/plugins/query_headlines/init.php @@ -0,0 +1,50 @@ +host = $host; + $host->add_hook($host::HOOK_QUERY_HEADLINES, $this); + } + + // passes in the array for an item + // second argument is the length of the preview the caller is using + // create a key called "modified_preview" if you change the preview and don't want + // caller to override with their default + + function hook_query_headlines($line, $preview_length = 100,$api_call=false) { + //make the author field empty + $line["author"] = ""; + + // and toss tags, since I don't use + $line["tag_cache"] = ""; + return $line; + + + } + + + function api_version() { + return 2; + } + +} +?> From 425a6edc6b3e84d0cc0ed144ab66421adac33fa5 Mon Sep 17 00:00:00 2001 From: justauser Date: Wed, 10 Jul 2013 04:24:29 -0400 Subject: [PATCH 8/8] forgot one file --- classes/feeds.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/feeds.php b/classes/feeds.php index ccc0548db..c5c120ed7 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -290,7 +290,7 @@ class Feeds extends Handler_Protected { while ($line = $this->dbh->fetch_assoc($result)) { $line["content_preview"] = "— " . truncate_string(strip_tags($line["content_preview"]),250); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { - $line = $p->hook_query_headlines($line, 250); + $line = $p->hook_query_headlines($line, 250, false); } $id = $line["id"]; $feed_id = $line["feed_id"];