Refactor bbcode() into BBCode::convert()

This commit is contained in:
Hypolite Petovan 2018-02-14 21:43:40 -05:00
parent f4e38b6ee9
commit 91fd77af3b
12 changed files with 37 additions and 23 deletions

View file

@ -25,7 +25,9 @@
* sets the counter back
* count only unseen elements which are not type=activity (likes and dislikes not seen as new elements)
*/
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
@ -211,7 +213,7 @@ function windowsphonepush_cron()
} else {
require_once('include/bbcode.php');
require_once("include/html2plain.php");
$body = bbcode($body, false, false, 2, true);
$body = BBCode::convert($body, false, 2, true);
$body = html2plain($body, 0);
$body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body);
}