X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fromapp%2Ffromapp.php;h=51392ff57ba5500ffa0438ec15894983e9b20df0;hb=ba5eeed5df7f955d1c51b6d469ca361312349173;hp=7a920dd3a7b0bbd4ad33da3498c6c1aa25e1414e;hpb=0b459e83794fff75fc9cbd980738147e367becf4;p=friendica-addons.git diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index 7a920dd3..51392ff5 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -7,6 +7,7 @@ * */ +use Friendica\Core\PConfig; function fromapp_install() { @@ -32,8 +33,8 @@ function fromapp_settings_post($a,$post) { if(! local_user() || (! x($_POST,'fromapp-submit'))) return; - set_pconfig(local_user(),'fromapp','app',$_POST['fromapp-input']); - set_pconfig(local_user(),'fromapp','force',intval($_POST['fromapp-force'])); + PConfig::set(local_user(),'fromapp','app',$_POST['fromapp-input']); + PConfig::set(local_user(),'fromapp','force',intval($_POST['fromapp-force'])); info( t('Fromapp settings updated.') . EOL); } @@ -49,19 +50,22 @@ function fromapp_settings(&$a,&$s) { /* Get the current state of our config variable */ - $fromapp = get_pconfig(local_user(),'fromapp','app'); - if($fromapp === false) - $fromapp = ''; + $fromapp = PConfig::get(local_user(),'fromapp', 'app', ''); - $force = intval(get_pconfig(local_user(),'fromapp','force')); + $force = intval(PConfig::get(local_user(),'fromapp','force')); $force_enabled = (($force) ? ' checked="checked" ' : ''); /* Add some HTML to the existing form */ - $s .= '
'; + $s .= ''; $s .= '

' . t('FromApp Settings') . '

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