X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=planets%2Fplanets.php;h=ea543f4097fa77f0160928a61a45f70b396d6ef3;hb=bdfe575365366690fe6a3934e793c67db1a2d623;hp=2453ffeeb42d4f135485fddaf5d00b9fd4df67eb;hpb=d3717045f7024396a46dd2cb1a472b482f6d6d63;p=friendica-addons.git diff --git a/planets/planets.php b/planets/planets.php index 2453ffee..ea543f40 100644 --- a/planets/planets.php +++ b/planets/planets.php @@ -7,9 +7,7 @@ * Author: Tony Baldwin */ use Friendica\Core\Hook; -use Friendica\Core\L10n; use Friendica\Core\Logger; -use Friendica\Core\PConfig; use Friendica\DI; function planets_install() { @@ -82,7 +80,7 @@ function planets_post_hook($a, &$item) { /* Retrieve our personal config setting */ - $active = PConfig::get(local_user(), 'planets', 'enable'); + $active = DI::pConfig()->get(local_user(), 'planets', 'enable'); if(! $active) return; @@ -120,7 +118,7 @@ function planets_settings_post($a,$post) { if(! local_user()) return; if($_POST['planets-submit']) - PConfig::set(local_user(),'planets','enable',intval($_POST['planets'])); + DI::pConfig()->set(local_user(),'planets','enable',intval($_POST['planets'])); } @@ -144,29 +142,29 @@ function planets_settings(&$a,&$s) { /* Get the current state of our config variable */ - $enabled = PConfig::get(local_user(),'planets','enable'); + $enabled = DI::pConfig()->get(local_user(),'planets','enable'); $checked = (($enabled) ? ' checked="checked" ' : ''); /* Add some HTML to the existing form */ $s .= ''; - $s .= '

' . L10n::t('Planets') . '

'; + $s .= '

' . DI::l10n()->t('Planets') . '

'; $s .= '
'; $s .= ''; + $s .= '
'; }