X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=startpage%2Fstartpage.php;h=9192b5a8e067652a747bd022437e8cdf568a46cc;hb=86b2d830a5da62f90c22b5d3f15921a60de25f37;hp=11633d408c7ce724f9674711a7ca41dd26069f3c;hpb=8504f2e9997e83c19d76a01a4fdbafd480b0926d;p=friendica-addons.git diff --git a/startpage/startpage.php b/startpage/startpage.php index 11633d40..9192b5a8 100644 --- a/startpage/startpage.php +++ b/startpage/startpage.php @@ -7,9 +7,6 @@ * */ use Friendica\Core\Hook; -use Friendica\Core\L10n; -use Friendica\Core\PConfig; -use Friendica\Core\System; use Friendica\DI; function startpage_install() { @@ -31,7 +28,7 @@ function startpage_home_init($a, $b) return; } - $page = PConfig::get(local_user(), 'startpage', 'startpage'); + $page = DI::pConfig()->get(local_user(), 'startpage', 'startpage'); if (strlen($page)) { DI::baseUrl()->redirect($page); } @@ -54,7 +51,7 @@ function startpage_settings_post($a, $post) } if (!empty($_POST['startpage-submit'])) { - PConfig::set(local_user(), 'startpage', 'startpage', strip_tags(trim($_POST['startpage']))); + DI::pConfig()->set(local_user(), 'startpage', 'startpage', strip_tags(trim($_POST['startpage']))); } } @@ -76,24 +73,24 @@ function startpage_settings(&$a, &$s) /* Get the current state of our config variable */ - $page = PConfig::get(local_user(), 'startpage', 'startpage'); + $page = DI::pConfig()->get(local_user(), 'startpage', 'startpage'); /* Add some HTML to the existing form */ $s .= ''; - $s .= '

' . L10n::t('Startpage') . '

'; + $s .= '

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

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