]> git.mxchange.org Git - friendica-addons.git/blobdiff - gnot/gnot.php
Issue 3873
[friendica-addons.git] / gnot / gnot.php
index fcdc7319f1520205258a55ace1f84e27558c0693..bbdf9d80ebae83e6db5a175e8f1d278986d2470b 100755 (executable)
@@ -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']);