X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=gnot%2Fgnot.php;h=bbdf9d80ebae83e6db5a175e8f1d278986d2470b;hp=fcdc7319f1520205258a55ace1f84e27558c0693;hb=48dcbc6f3fc3edae74e3ea2c823011bfb7c26081;hpb=0b459e83794fff75fc9cbd980738147e367becf4 diff --git a/gnot/gnot.php b/gnot/gnot.php index fcdc7319..bbdf9d80 100755 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -8,6 +8,7 @@ * */ +use Friendica\Core\PConfig; function gnot_install() { @@ -44,7 +45,7 @@ function gnot_settings_post($a,$post) { if(! local_user() || (! x($_POST,'gnot-submit'))) return; - set_pconfig(local_user(),'gnot','enable',intval($_POST['gnot'])); + PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot'])); info( t('Gnot settings updated.') . EOL); } @@ -69,7 +70,7 @@ function gnot_settings(&$a,&$s) { /* Get the current state of our config variable */ - $gnot = intval(get_pconfig(local_user(),'gnot','enable')); + $gnot = intval(PConfig::get(local_user(),'gnot','enable')); $gnot_checked = (($gnot) ? ' checked="checked" ' : '' ); @@ -91,7 +92,7 @@ function gnot_settings(&$a,&$s) { function gnot_enotify_mail(&$a,&$b) { - if((! $b['uid']) || (! intval(get_pconfig($b['uid'], 'gnot','enable')))) + if((! $b['uid']) || (! intval(PConfig::get($b['uid'], 'gnot','enable')))) return; if($b['type'] == NOTIFY_COMMENT) $b['subject'] = sprintf( t('[Friendica:Notify] Comment to conversation #%d'), $b['parent']);