"temporary" fix for ArticleGenerator::getSummary
This commit is contained in:
parent
ad2ff5236b
commit
17e4e5570e
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue