X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=windowsphonepush%2Fwindowsphonepush.php;h=3aaf1d3092e90434cf12eb25cd10bde10da3a8ae;hb=e0bc167742cdde2fec6fd4e110d26134b3222e6c;hp=033d2a64a04127844e668a5b654e7b2183f8e2b0;hpb=7ab24791667ab0ab1a04d01802e0a3ff47110c24;p=friendica-addons.git diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php index 033d2a64..3aaf1d30 100644 --- a/windowsphonepush/windowsphonepush.php +++ b/windowsphonepush/windowsphonepush.php @@ -25,7 +25,10 @@ * 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\Content\Text\HTML; use Friendica\Core\Addon; use Friendica\Core\L10n; use Friendica\Core\PConfig; @@ -209,10 +212,8 @@ function windowsphonepush_cron() if (substr($body, 0, 4) == "[url") { $body = "URL/Image ..."; } else { - require_once('include/bbcode.php'); - require_once("include/html2plain.php"); - $body = bbcode($body, false, false, 2, true); - $body = html2plain($body, 0); + $body = BBCode::convert($body, false, 2, true); + $body = HTML::toPlaintext($body, 0); $body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body); } } else {