X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=startpage%2Fstartpage.php;h=c4324576609d90f07978c24366457a4645db13dc;hb=42eefed6e68d241bd8bdf9eceea96abc445a9cac;hp=6a95310e3ec705a63f0a49d5623a262cf34e1729;hpb=dfa4cfc7cde6c6f755beae5818fe3eee99724c5c;p=friendica-addons.git diff --git a/startpage/startpage.php b/startpage/startpage.php index 6a95310e..c4324576 100644 --- a/startpage/startpage.php +++ b/startpage/startpage.php @@ -7,6 +7,7 @@ * */ +use Friendica\Core\PConfig; function startpage_install() { register_hook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init'); @@ -27,7 +28,7 @@ function startpage_home_init($a, $b) { if(! local_user()) return; - $page = get_pconfig(local_user(),'startpage','startpage'); + $page = PConfig::get(local_user(),'startpage','startpage'); if(strlen($page)) { $slash = ((strpos($page,'/') === 0) ? true : false); if(stristr($page,'://')) @@ -50,7 +51,7 @@ function startpage_settings_post($a,$post) { if(! local_user()) return; if($_POST['startpage-submit']) - set_pconfig(local_user(),'startpage','startpage',strip_tags(trim($_POST['startpage']))); + PConfig::set(local_user(),'startpage','startpage',strip_tags(trim($_POST['startpage']))); } @@ -74,13 +75,18 @@ function startpage_settings(&$a,&$s) { /* Get the current state of our config variable */ - $page = get_pconfig(local_user(),'startpage','startpage'); + $page = PConfig::get(local_user(),'startpage','startpage'); /* Add some HTML to the existing form */ - $s .= '
'; - $s .= '

' . t('Startpage Settings') . '

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

' . t('Startpage') . '

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