]> git.mxchange.org Git - friendica-addons.git/commitdiff
Move PConfig::delete() to DI::pConfig()->delete()
authornupplaPhil <admin@philipp.info>
Sat, 18 Jan 2020 15:56:45 +0000 (16:56 +0100)
committernupplaPhil <admin@philipp.info>
Sat, 18 Jan 2020 15:56:45 +0000 (16:56 +0100)
catavatar/catavatar.php
ifttt/ifttt.php
mailstream/mailstream.php
pumpio/pumpio.php
statusnet/statusnet.php
twitter/twitter.php
widgets/widgets.php

index 18406490156add6155ce97b80df065b5a01fcba0..8baf045799aa916da23047b8b122daa4bf9b4a26 100644 (file)
@@ -128,7 +128,7 @@ function catavatar_addon_settings_post(App $a, &$s)
        }
 
        if (!empty($_POST['catavatar-emailcat'])) {
-               PConfig::delete(local_user(), 'catavatar', 'seed');
+               DI::pConfig()->delete(local_user(), 'catavatar', 'seed');
        }
 }
 
index 2be43de20047a32372ca95c590f2dfc72d8ac838..44c58739f435b6f65ac4d17b02bd3040f73b7aea 100644 (file)
@@ -89,7 +89,7 @@ function ifttt_settings(App $a, &$s)
 function ifttt_settings_post()
 {
        if (!empty($_POST['ifttt-submit']) && isset($_POST['ifttt-rekey'])) {
-               PConfig::delete(local_user(), 'ifttt', 'key');
+               DI::pConfig()->delete(local_user(), 'ifttt', 'key');
        }
 }
 
index 4aad1d225b53256250b26c4041959ad0c8d1efb4..3513d58132307d77925b3fca5064eced243593d6 100644 (file)
@@ -403,25 +403,25 @@ function mailstream_addon_settings_post($a,$post) {
                DI::pConfig()->set(local_user(), 'mailstream', 'address', $_POST['mailstream_address']);
        }
        else {
-               PConfig::delete(local_user(), 'mailstream', 'address');
+               DI::pConfig()->delete(local_user(), 'mailstream', 'address');
        }
        if ($_POST['mailstream_nolikes']) {
                DI::pConfig()->set(local_user(), 'mailstream', 'nolikes', $_POST['mailstream_enabled']);
        }
        else {
-               PConfig::delete(local_user(), 'mailstream', 'nolikes');
+               DI::pConfig()->delete(local_user(), 'mailstream', 'nolikes');
        }
        if ($_POST['mailstream_enabled']) {
                DI::pConfig()->set(local_user(), 'mailstream', 'enabled', $_POST['mailstream_enabled']);
        }
        else {
-               PConfig::delete(local_user(), 'mailstream', 'enabled');
+               DI::pConfig()->delete(local_user(), 'mailstream', 'enabled');
        }
        if ($_POST['mailstream_attachimg']) {
                DI::pConfig()->set(local_user(), 'mailstream', 'attachimg', $_POST['mailstream_attachimg']);
        }
        else {
-               PConfig::delete(local_user(), 'mailstream', 'attachimg');
+               DI::pConfig()->delete(local_user(), 'mailstream', 'attachimg');
        }
 }
 
index 70352adcede39c0c9a762eb79830383ba93d04ff..08a1696bc06264bfb0949ba22d1b1bf6630058e8 100644 (file)
@@ -373,7 +373,7 @@ function pumpio_settings_post(App $a, array &$b)
                        DI::pConfig()->set(local_user(), 'pumpio', 'post_by_default', $_POST['pumpio_bydefault'] ?? false);
 
                        if (!empty($_POST['pumpio_mirror'])) {
-                               PConfig::delete(local_user(), 'pumpio', 'lastdate');
+                               DI::pConfig()->delete(local_user(), 'pumpio', 'lastdate');
                        }
                }
        }
index e19b7e3fc24933be780b342f1c9b43cb9688ad01..5eaffc3d9fea70ce271f64ce8607523932355aba 100644 (file)
@@ -134,18 +134,18 @@ function statusnet_settings_post(App $a, $post)
                /*               * *
                 * if the GNU Social-disconnect checkbox is set, clear the GNU Social configuration
                 */
-               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_url');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'consumerkey');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'consumersecret');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'post');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'post_by_default');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'oauthtoken');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'oauthsecret');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'baseapi');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'lastid');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'mirror_posts');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'import');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'create_user');
+               DI::pConfig()->delete(local_user(), 'statusnet', 'own_url');
        } else {
                if (isset($_POST['statusnet-preconf-apiurl'])) {
                        /*                       * *
@@ -225,7 +225,7 @@ function statusnet_settings_post(App $a, $post)
                                        DI::pConfig()->set(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user']));
 
                                        if (!intval($_POST['statusnet-mirror']))
-                                               PConfig::delete(local_user(), 'statusnet', 'lastid');
+                                               DI::pConfig()->delete(local_user(), 'statusnet', 'lastid');
 
                                        info(L10n::t('GNU Social settings updated.') . EOL);
                                }
@@ -1575,7 +1575,7 @@ function statusnet_fetch_own_contact(App $a, $uid)
                if (DBA::isResult($r)) {
                        $contact_id = $r[0]["id"];
                } else {
-                       PConfig::delete($uid, 'statusnet', 'own_url');
+                       DI::pConfig()->delete($uid, 'statusnet', 'own_url');
                }
        }
        return $contact_id;
index fe66886f200733ba272044ff4b4c7abce61203cc..25c48a95f6ea85aa8d5246507e74f680a6371743 100644 (file)
@@ -227,17 +227,17 @@ function twitter_settings_post(App $a)
                 * if the twitter-disconnect checkbox is set, clear the OAuth key/secret pair
                 * from the user configuration
                 */
-               PConfig::delete(local_user(), 'twitter', 'consumerkey');
-               PConfig::delete(local_user(), 'twitter', 'consumersecret');
-               PConfig::delete(local_user(), 'twitter', 'oauthtoken');
-               PConfig::delete(local_user(), 'twitter', 'oauthsecret');
-               PConfig::delete(local_user(), 'twitter', 'post');
-               PConfig::delete(local_user(), 'twitter', 'post_by_default');
-               PConfig::delete(local_user(), 'twitter', 'lastid');
-               PConfig::delete(local_user(), 'twitter', 'mirror_posts');
-               PConfig::delete(local_user(), 'twitter', 'import');
-               PConfig::delete(local_user(), 'twitter', 'create_user');
-               PConfig::delete(local_user(), 'twitter', 'own_id');
+               DI::pConfig()->delete(local_user(), 'twitter', 'consumerkey');
+               DI::pConfig()->delete(local_user(), 'twitter', 'consumersecret');
+               DI::pConfig()->delete(local_user(), 'twitter', 'oauthtoken');
+               DI::pConfig()->delete(local_user(), 'twitter', 'oauthsecret');
+               DI::pConfig()->delete(local_user(), 'twitter', 'post');
+               DI::pConfig()->delete(local_user(), 'twitter', 'post_by_default');
+               DI::pConfig()->delete(local_user(), 'twitter', 'lastid');
+               DI::pConfig()->delete(local_user(), 'twitter', 'mirror_posts');
+               DI::pConfig()->delete(local_user(), 'twitter', 'import');
+               DI::pConfig()->delete(local_user(), 'twitter', 'create_user');
+               DI::pConfig()->delete(local_user(), 'twitter', 'own_id');
        } else {
                if (isset($_POST['twitter-pin'])) {
                        //  if the user supplied us with a PIN from Twitter, let the magic of OAuth happen
@@ -275,7 +275,7 @@ function twitter_settings_post(App $a)
                        DI::pConfig()->set(local_user(), 'twitter', 'create_user', intval($_POST['twitter-create_user']));
 
                        if (!intval($_POST['twitter-mirror'])) {
-                               PConfig::delete(local_user(), 'twitter', 'lastid');
+                               DI::pConfig()->delete(local_user(), 'twitter', 'lastid');
                        }
 
                        info(L10n::t('Twitter settings updated.') . EOL);
@@ -1834,7 +1834,7 @@ function twitter_fetch_own_contact(App $a, $uid)
                if (DBA::isResult($r)) {
                        $contact_id = $r[0]["id"];
                } else {
-                       PConfig::delete($uid, 'twitter', 'own_id');
+                       DI::pConfig()->delete($uid, 'twitter', 'own_id');
                }
        }
 
index 0d8d2a703201ddf2f37ada38de543f85098ebfdc..35dbfa5e1c99c7ef7290720b6753f83a2da46245 100644 (file)
@@ -30,7 +30,7 @@ function widgets_settings_post(){
        if(! local_user())
                return;
        if (isset($_POST['widgets-submit'])){
-               PConfig::delete(local_user(), 'widgets', 'key');
+               DI::pConfig()->delete(local_user(), 'widgets', 'key');
 
        }
 }