Revert changes to use old text shortener

The old text shortener is not compatible with phpBB 3.2.
This commit is contained in:
Marc Alexander
2017-01-29 16:55:49 +01:00
committed by GitHub
parent af78256355
commit 93ea98f744

View File

@@ -651,10 +651,11 @@ class fetch_posts
*/
public function shorten_message($message, $bbcode_uid, $length)
{
if (class_exists('\Nickvergessen\TrimMessage\TrimMessage'))
if (class_exists('\Marc1706\TextShortener\Shortener'))
{
$trim = new \Nickvergessen\TrimMessage\TrimMessage($message, $bbcode_uid, $length);
$message = $trim->message();
$trim = new \Marc1706\TextShortener\Shortener();
$message = $trim->setText($message)
->shortenText($length);
unset($trim);
}