From d20e60ef9180ea7c0c921a03de5466a04b286565 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Nov 2017 07:20:44 +0100 Subject: [PATCH 1/6] use pconfig::delete in mailstream addon --- mailstream/mailstream.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index e7721e9a..13241480 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -381,25 +381,25 @@ function mailstream_plugin_settings_post($a,$post) { PConfig::set(local_user(), 'mailstream', 'address', $_POST['mailstream_address']); } else { - del_pconfig(local_user(), 'mailstream', 'address'); + PConfig::delete(local_user(), 'mailstream', 'address'); } if ($_POST['mailstream_nolikes']) { PConfig::set(local_user(), 'mailstream', 'nolikes', $_POST['mailstream_enabled']); } else { - del_pconfig(local_user(), 'mailstream', 'nolikes'); + PConfig::delete(local_user(), 'mailstream', 'nolikes'); } if ($_POST['mailstream_enabled']) { PConfig::set(local_user(), 'mailstream', 'enabled', $_POST['mailstream_enabled']); } else { - del_pconfig(local_user(), 'mailstream', 'enabled'); + PConfig::delete(local_user(), 'mailstream', 'enabled'); } if ($_POST['mailstream_attachimg']) { PConfig::set(local_user(), 'mailstream', 'attachimg', $_POST['mailstream_attachimg']); } else { - del_pconfig(local_user(), 'mailstream', 'attachimg'); + PConfig::delete(local_user(), 'mailstream', 'attachimg'); } } From 3a7fadec48fe0ebdbd365febfc170a9f16e3acba Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Nov 2017 07:21:47 +0100 Subject: [PATCH 2/6] use pconfig::delete in ifttt addon --- ifttt/ifttt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index ddd517e2..2828d502 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -77,7 +77,7 @@ function ifttt_settings_post(&$a,&$b) { if(x($_POST,'ifttt-submit')) if (isset($_POST['ifttt-rekey'])) - del_pconfig(local_user(), 'ifttt', 'key'); + PConfig::delete(local_user(), 'ifttt', 'key'); } function ifttt_post(&$a) { From 64369ebfa490ff9d5e5a44177e4eebd4371ceb0e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Nov 2017 07:22:24 +0100 Subject: [PATCH 3/6] use pconfig::delete in gnusocial addon --- statusnet/statusnet.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index f7158a40..75b1d7d1 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -174,18 +174,18 @@ function statusnet_settings_post ($a,$post) { /*** * if the GNU Social-disconnect checkbox is set, clear the GNU Social configuration */ - del_pconfig(local_user(), 'statusnet', 'consumerkey'); - del_pconfig(local_user(), 'statusnet', 'consumersecret'); - del_pconfig(local_user(), 'statusnet', 'post'); - del_pconfig(local_user(), 'statusnet', 'post_by_default'); - del_pconfig(local_user(), 'statusnet', 'oauthtoken'); - del_pconfig(local_user(), 'statusnet', 'oauthsecret'); - del_pconfig(local_user(), 'statusnet', 'baseapi'); - del_pconfig(local_user(), 'statusnet', 'lastid'); - del_pconfig(local_user(), 'statusnet', 'mirror_posts'); - del_pconfig(local_user(), 'statusnet', 'import'); - del_pconfig(local_user(), 'statusnet', 'create_user'); - del_pconfig(local_user(), 'statusnet', 'own_id'); + PConfig::delete(local_user(), 'statusnet', 'consumerkey'); + PConfig::delete(local_user(), 'statusnet', 'consumersecret'); + PConfig::delete(local_user(), 'statusnet', 'post'); + PConfig::delete(local_user(), 'statusnet', 'post_by_default'); + PConfig::delete(local_user(), 'statusnet', 'oauthtoken'); + PConfig::delete(local_user(), 'statusnet', 'oauthsecret'); + PConfig::delete(local_user(), 'statusnet', 'baseapi'); + PConfig::delete(local_user(), 'statusnet', 'lastid'); + PConfig::delete(local_user(), 'statusnet', 'mirror_posts'); + PConfig::delete(local_user(), 'statusnet', 'import'); + PConfig::delete(local_user(), 'statusnet', 'create_user'); + PConfig::delete(local_user(), 'statusnet', 'own_id'); } else { if (isset($_POST['statusnet-preconf-apiurl'])) { /*** @@ -265,7 +265,7 @@ function statusnet_settings_post ($a,$post) { PConfig::set(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user'])); if (!intval($_POST['statusnet-mirror'])) - del_pconfig(local_user(),'statusnet','lastid'); + PConfig::delete(local_user(),'statusnet','lastid'); info( t('GNU Social settings updated.') . EOL); }}}} @@ -1687,7 +1687,7 @@ function statusnet_fetch_own_contact($a, $uid) { if(count($r)) $contact_id = $r[0]["id"]; else - del_pconfig($uid, 'statusnet', 'own_url'); + PConfig::delete($uid, 'statusnet', 'own_url'); } return($contact_id); From 2b64efd907b46498e6a23b746474b2c7781a937a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Nov 2017 07:22:46 +0100 Subject: [PATCH 4/6] use pconfig::delete in fromgplus addon --- fromgplus/fromgplus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 984ab4b4..0627b026 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -86,7 +86,7 @@ function fromgplus_addon_settings_post(&$a,&$b) { PConfig::set(local_user(),'fromgplus', 'keywords', $keywords); if (!$enable) - del_pconfig(local_user(),'fromgplus','lastdate'); + PConfig::delete(local_user(),'fromgplus','lastdate'); info( t('Google+ Import Settings saved.') . EOL); } From 916c359eb01bb17ca24ef279cc0282a9b63c8abd Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Nov 2017 07:23:15 +0100 Subject: [PATCH 5/6] use pconfig::delete in pumpio addon --- pumpio/pumpio.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index ff9a3ac3..81b5e107 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -348,7 +348,7 @@ function pumpio_settings_post(&$a,&$b) { PConfig::set(local_user(),'pumpio','post_by_default',intval($_POST['pumpio_bydefault'])); if (!$_POST['pumpio_mirror']) - del_pconfig(local_user(),'pumpio','lastdate'); + PConfig::delete(local_user(),'pumpio','lastdate'); //header("Location: ".$a->get_baseurl()."/pumpio/connect"); } From fa08537213c82dbdf982a19fd94b290c7a83746a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Nov 2017 07:23:31 +0100 Subject: [PATCH 6/6] use pconfig::delete in widgets addon --- widgets/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/widgets.php b/widgets/widgets.php index e6293244..a232d9e6 100755 --- a/widgets/widgets.php +++ b/widgets/widgets.php @@ -23,7 +23,7 @@ function widgets_settings_post(){ if(! local_user()) return; if (isset($_POST['widgets-submit'])){ - del_pconfig(local_user(), 'widgets', 'key'); + PConfig::delete(local_user(), 'widgets', 'key'); } }