diff options
author | justauser <[email protected]> | 2013-06-28 10:46:45 -0400 |
---|---|---|
committer | justauser <[email protected]> | 2013-06-28 10:46:45 -0400 |
commit | 67631438353273ea260be518e627bc25500e01f2 (patch) | |
tree | 13b1cc4871094a6d382a0e68ffa338ebed730bdf /classes/api.php | |
parent | 2e188438456314d4cffab67c6a0baddb0b364b05 (diff) |
Changed the implementation of HOOK_QUERY_HEADLINES to deal with issue Fox raised
Diffstat (limited to 'classes/api.php')
-rw-r--r-- | classes/api.php | 11 |
1 files changed, 3 insertions, 8 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) { |