move reassigning content_preview after hook to a more sensible place

This commit is contained in:
Andrew Dolgov 2013-07-10 16:52:03 +04:00
parent 0790ea4643
commit 4ab1eb9c94
1 changed files with 8 additions and 6 deletions

View File

@ -289,9 +289,15 @@ class Feeds extends Handler_Protected {
while ($line = $this->dbh->fetch_assoc($result)) { while ($line = $this->dbh->fetch_assoc($result)) {
$line["content_preview"] = "— " . truncate_string(strip_tags($line["content_preview"]), 250); $line["content_preview"] = "— " . truncate_string(strip_tags($line["content_preview"]), 250);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 250, false); $line = $p->hook_query_headlines($line, 250, false);
} }
if (get_pref('SHOW_CONTENT_PREVIEW')) {
$content_preview = $line["content_preview"];
}
$id = $line["id"]; $id = $line["id"];
$feed_id = $line["feed_id"]; $feed_id = $line["feed_id"];
$label_cache = $line["label_cache"]; $label_cache = $line["label_cache"];
@ -364,10 +370,6 @@ class Feeds extends Handler_Protected {
$date_entered_fmt = T_sprintf("Imported at %s", $date_entered_fmt = T_sprintf("Imported at %s",
make_local_datetime($line["date_entered"], false)); make_local_datetime($line["date_entered"], false));
if (get_pref('SHOW_CONTENT_PREVIEW') ) {
$content_preview = $line["content_preview"];
}
$score = $line["score"]; $score = $line["score"];
$score_pic = "images/" . get_score_pic($score); $score_pic = "images/" . get_score_pic($score);