Issue 3873

Replace deprecated functions with new syntax
This commit is contained in:
Adam Magness 2017-11-06 18:55:24 -05:00
parent 72474dc2f6
commit 48dcbc6f3f
61 changed files with 1036 additions and 920 deletions

View file

@ -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,11 +50,11 @@ function fromapp_settings(&$a,&$s) {
/* Get the current state of our config variable */
$fromapp = get_pconfig(local_user(),'fromapp','app');
$fromapp = PConfig::get(local_user(),'fromapp','app');
if($fromapp === false)
$fromapp = '';
$force = intval(get_pconfig(local_user(),'fromapp','force'));
$force = intval(PConfig::get(local_user(),'fromapp','force'));
$force_enabled = (($force) ? ' checked="checked" ' : '');
@ -90,8 +91,8 @@ function fromapp_post_hook(&$a,&$item) {
if(local_user() != $item['uid'])
return;
$app = get_pconfig(local_user(), 'fromapp', 'app');
$force = intval(get_pconfig(local_user(), 'fromapp','force'));
$app = PConfig::get(local_user(), 'fromapp', 'app');
$force = intval(PConfig::get(local_user(), 'fromapp','force'));
if(($app === false) || (! strlen($app)))
return;