X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=numfriends%2Fnumfriends.php;h=f12badeb40a5cd4f4811256c8c494c8b5343734a;hb=a0344101f122248c3069a5dcfa3ebfcb67215d5a;hp=1e0609bd7e73032ed83296f5af5ea926683b62a0;hpb=a26bfe79e97813ebe4c27fa3cb65c32669a9f2e5;p=friendica-addons.git diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php index 1e0609bd..f12badeb 100644 --- a/numfriends/numfriends.php +++ b/numfriends/numfriends.php @@ -6,7 +6,6 @@ * Author: Mike Macgirvin */ use Friendica\Core\Hook; -use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\DI; @@ -18,16 +17,6 @@ function numfriends_install() { Logger::log("installed numfriends"); } - -function numfriends_uninstall() { - - Hook::unregister('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); - Hook::unregister('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); - - - Logger::log("removed numfriends"); -} - /** * * Callback from the settings post function. @@ -41,7 +30,6 @@ function numfriends_settings_post($a,$post) { return; DI::pConfig()->set(local_user(),'system','display_friend_count',intval($_POST['numfriends'])); - info( L10n::t('Numfriends settings updated.') . EOL); } @@ -68,13 +56,13 @@ function numfriends_settings(&$a, &$s) /* Add some HTML to the existing form */ $s .= '
'; - $s .= '

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

'; + $s .= '

' . DI::l10n()->t('Numfriends Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; }