mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/15403] Return first fragment of text if there is no coincidences
PHPBB-15403
This commit is contained in:
@@ -399,10 +399,10 @@ function get_context($text, $words, $length = 400)
|
||||
// Get the last fragment
|
||||
$fragments[] = $fragment;
|
||||
|
||||
$output = htmlentities(implode('', $fragments));
|
||||
return htmlentities(implode('', $fragments));
|
||||
}
|
||||
|
||||
return $output;
|
||||
return htmlentities($text_length >= $length + 3 ? utf8_substr($text, 0, $length) . ' ...' : $text);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user