"temporary" fix for ArticleGenerator::getSummary

This commit is contained in:
Marcel Kapfer (mmk2410) 2016-06-06 22:21:38 +02:00
parent ad2ff5236b
commit 17e4e5570e

View file

@ -196,15 +196,15 @@ class ArticleGenerator
*/
static function getSummary($directory, $articlefile)
{
$text = getText($directory, $articlefile);
$text = ArticleGenerator::getText($directory, $articlefile);
$pos = stripos($text, ".");
if ($pos) {
$offset = $pos + 1;
$offset = $pos;
$pos = stripos($text, ".", $offset);
$summary = substr($text, 0, $pos) . ".";
return $summary;
return trim($summary);
} else {
return $text;
}