}
if (!empty($_POST['catavatar-emailcat'])) {
- PConfig::delete(local_user(), 'catavatar', 'seed');
+ DI::pConfig()->delete(local_user(), 'catavatar', 'seed');
}
}
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');
}
}
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');
}
}
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');
}
}
}
/* * *
* 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'])) {
/* * *
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);
}
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;
* 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
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);
if (DBA::isResult($r)) {
$contact_id = $r[0]["id"];
} else {
- PConfig::delete($uid, 'twitter', 'own_id');
+ DI::pConfig()->delete($uid, 'twitter', 'own_id');
}
}
if(! local_user())
return;
if (isset($_POST['widgets-submit'])){
- PConfig::delete(local_user(), 'widgets', 'key');
+ DI::pConfig()->delete(local_user(), 'widgets', 'key');
}
}