api: getHeadlines - truncate article excerpt properly

This commit is contained in:
Andrew Dolgov 2009-12-16 20:55:49 +03:00
parent c45ffc0c06
commit ba8cd9a76f
1 changed files with 4 additions and 1 deletions

View File

@ -231,7 +231,10 @@
"feed_id" => $line["feed_id"],
);
if ($show_except) $headline_row["excerpt"] = $line["content_preview"];
if ($show_except) {
$excerpt = truncate_string(strip_tags($line["content_preview"]), 100);
$headline_row["excerpt"] = $excerpt;
}
array_push($headlines, $headline_row);
}