X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=windowsphonepush%2Fwindowsphonepush.php;h=206b0883e4b03241db96b7909d50ea28372a853e;hb=38bf5d4a5afec8f0cb58ddd5742815238219f10d;hp=032a53681f913d5de496726c5970fbf2f1a0ca7a;hpb=afaa39ed7bfc68536ba75ba81229a6f1700ff9b1;p=friendica-addons.git diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php index 032a5368..206b0883 100644 --- a/windowsphonepush/windowsphonepush.php +++ b/windowsphonepush/windowsphonepush.php @@ -25,8 +25,11 @@ * 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; use Friendica\Model\User; @@ -86,7 +89,7 @@ function windowsphonepush_settings_post($a, $post) PConfig::set(local_user(), 'windowsphonepush', 'senditemtext', intval($_POST['windowsphonepush-senditemtext'])); - info(t('WindowsPhonePush settings updated.') . EOL); + info(L10n::t('WindowsPhonePush settings updated.') . EOL); } /* Called from the Addon Setting form. @@ -112,20 +115,20 @@ function windowsphonepush_settings(&$a, &$s) /* Add some HTML to the existing form */ $s .= '
'; - $s .= '

' . t('WindowsPhonePush Settings') . '

'; + $s .= '

' . L10n::t('WindowsPhonePush Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button - enable und senditemtext can be changed by the user */ - $s .= '
'; + $s .= '
'; /* provide further read-only information concerning the addon (useful for */ $s .= '
'; @@ -208,9 +211,9 @@ 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 = BBCode::convert($body, false, 2, true); $body = html2plain($body, 0); $body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body); }