"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
1 changed files with 3 additions and 3 deletions

View File

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