}
if (!empty($_POST['blockem-submit'])) {
- PConfig::set(local_user(), 'blockem', 'words', trim($_POST['blockem-words']));
+ DI::pConfig()->set(local_user(), 'blockem', 'words', trim($_POST['blockem-words']));
info(L10n::t('BLOCKEM Settings saved.') . EOL);
}
}
$words = implode(',', $newarr);
}
- PConfig::set(local_user(), 'blockem', 'words', $words);
+ DI::pConfig()->set(local_user(), 'blockem', 'words', $words);
info(L10n::t('blockem settings updated') . EOL);
exit();
}
function blogger_settings_post(App $a, array &$b)
{
if (!empty($_POST['blogger-submit'])) {
- PConfig::set(local_user(), 'blogger', 'post', $_POST['blogger'] ?? false);
- PConfig::set(local_user(), 'blogger', 'post_by_default', $_POST['bl_bydefault'] ?? false);
- PConfig::set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username']));
- PConfig::set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password']));
- PConfig::set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog']));
+ DI::pConfig()->set(local_user(), 'blogger', 'post', $_POST['blogger'] ?? false);
+ DI::pConfig()->set(local_user(), 'blogger', 'post_by_default', $_POST['bl_bydefault'] ?? false);
+ DI::pConfig()->set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username']));
+ DI::pConfig()->set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password']));
+ DI::pConfig()->set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog']));
}
}
Logger::log("buffer_connect: authenticated");
$o = L10n::t("You are now authenticated to buffer. ");
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
- PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token);
+ DI::pConfig()->set(local_user(), 'buffer','access_token', $buffer->access_token);
}
return $o;
{
if (!empty($_POST['buffer-submit'])) {
if (!empty($_POST['buffer_delete'])) {
- PConfig::set(local_user(), 'buffer', 'access_token' , '');
- PConfig::set(local_user(), 'buffer', 'post' , false);
- PConfig::set(local_user(), 'buffer', 'post_by_default', false);
+ DI::pConfig()->set(local_user(), 'buffer', 'access_token' , '');
+ DI::pConfig()->set(local_user(), 'buffer', 'post' , false);
+ DI::pConfig()->set(local_user(), 'buffer', 'post_by_default', false);
} else {
- PConfig::set(local_user(), 'buffer', 'post' , intval($_POST['buffer'] ?? false));
- PConfig::set(local_user(), 'buffer', 'post_by_default', intval($_POST['buffer_bydefault'] ?? false));
+ DI::pConfig()->set(local_user(), 'buffer', 'post' , intval($_POST['buffer'] ?? false));
+ DI::pConfig()->set(local_user(), 'buffer', 'post_by_default', intval($_POST['buffer_bydefault'] ?? false));
}
}
}
}
if (!empty($_POST['catavatar-morecat'])) {
- PConfig::set(local_user(), 'catavatar', 'seed', time());
+ DI::pConfig()->set(local_user(), 'catavatar', 'seed', time());
}
if (!empty($_POST['catavatar-emailcat'])) {
'icon' => (string) $res->weather['icon'],
];
- PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
+ DI::pConfig()->set(local_user(), 'curweather', 'last', $now->getTimestamp());
Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
return $r;
return;
}
- PConfig::set(local_user(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
- PConfig::set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
- PConfig::set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
+ DI::pConfig()->set(local_user(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
+ DI::pConfig()->set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
+ DI::pConfig()->set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
info(L10n::t('Current Weather settings updated.') . EOL);
}
function diaspora_settings_post(App $a, &$b)
{
if (!empty($_POST['diaspora-submit'])) {
- PConfig::set(local_user(),'diaspora', 'post' , intval($_POST['diaspora']));
- PConfig::set(local_user(),'diaspora', 'post_by_default', intval($_POST['diaspora_bydefault']));
- PConfig::set(local_user(),'diaspora', 'handle' , trim($_POST['handle']));
- PConfig::set(local_user(),'diaspora', 'password' , trim($_POST['password']));
- PConfig::set(local_user(),'diaspora', 'aspect' , trim($_POST['aspect']));
+ DI::pConfig()->set(local_user(),'diaspora', 'post' , intval($_POST['diaspora']));
+ DI::pConfig()->set(local_user(),'diaspora', 'post_by_default', intval($_POST['diaspora_bydefault']));
+ DI::pConfig()->set(local_user(),'diaspora', 'handle' , trim($_POST['handle']));
+ DI::pConfig()->set(local_user(),'diaspora', 'password' , trim($_POST['password']));
+ DI::pConfig()->set(local_user(),'diaspora', 'aspect' , trim($_POST['aspect']));
}
}
return;
}
- PConfig::set(local_user(), 'discourse', 'enabled', intval($_POST['enabled']));
+ DI::pConfig()->set(local_user(), 'discourse', 'enabled', intval($_POST['enabled']));
}
function discourse_email_getmessage(App $a, &$message)
function dwpost_settings_post(App $a, array &$b)
{
if (!empty($_POST['dwpost-submit'])) {
- PConfig::set(local_user(), 'dwpost', 'post', intval($_POST['dwpost']));
- PConfig::set(local_user(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
- PConfig::set(local_user(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
- PConfig::set(local_user(), 'dwpost', 'dw_password', trim($_POST['dw_password']));
+ DI::pConfig()->set(local_user(), 'dwpost', 'post', intval($_POST['dwpost']));
+ DI::pConfig()->set(local_user(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
+ DI::pConfig()->set(local_user(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
+ DI::pConfig()->set(local_user(), 'dwpost', 'dw_password', trim($_POST['dw_password']));
}
}
return;
}
- PConfig::set(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
- PConfig::set(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
+ DI::pConfig()->set(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
+ DI::pConfig()->set(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
info(L10n::t('Fromapp settings updated.') . EOL);
}
return;
}
- PConfig::set(local_user(), 'geonames', 'enable', intval($_POST['geonames-enable']));
+ DI::pConfig()->set(local_user(), 'geonames', 'enable', intval($_POST['geonames-enable']));
info(L10n::t('Geonames settings updated.'));
}
if(! local_user() || empty($_POST['gnot-submit']))
return;
- PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot']));
+ DI::pConfig()->set(local_user(),'gnot','enable',intval($_POST['gnot']));
info(L10n::t('Gnot settings updated.') . EOL);
}
function group_text_settings_post($a,$post) {
if(! local_user() || empty($_POST['group_text-submit']))
return;
- PConfig::set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
+ DI::pConfig()->set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
info(L10n::t('Group Text settings updated.') . EOL);
}
if (!$key) {
$key = Strings::getRandomHex(20);
- PConfig::set(local_user(), 'ifttt', 'key', $key);
+ DI::pConfig()->set(local_user(), 'ifttt', 'key', $key);
}
$s .= '<span id="settings_ifttt_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_ifttt_expanded\'); openClose(\'settings_ifttt_inflated\');">';
function ijpost_settings_post(&$a, &$b)
{
if (!empty($_POST['ijpost-submit'])) {
- PConfig::set(local_user(), 'ijpost', 'post', intval($_POST['ijpost']));
- PConfig::set(local_user(), 'ijpost', 'post_by_default', intval($_POST['ij_bydefault']));
- PConfig::set(local_user(), 'ijpost', 'ij_username', trim($_POST['ij_username']));
- PConfig::set(local_user(), 'ijpost', 'ij_password', trim($_POST['ij_password']));
+ DI::pConfig()->set(local_user(), 'ijpost', 'post', intval($_POST['ijpost']));
+ DI::pConfig()->set(local_user(), 'ijpost', 'post_by_default', intval($_POST['ij_bydefault']));
+ DI::pConfig()->set(local_user(), 'ijpost', 'ij_username', trim($_POST['ij_username']));
+ DI::pConfig()->set(local_user(), 'ijpost', 'ij_password', trim($_POST['ij_password']));
}
}
if(!empty($_POST['irc-submit'])) {
if (isset($_POST['autochans'])) {
- PConfig::set(local_user(), 'irc', 'autochans', trim(($_POST['autochans'])));
+ DI::pConfig()->set(local_user(), 'irc', 'autochans', trim(($_POST['autochans'])));
}
if (isset($_POST['sitechats'])) {
- PConfig::set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats']));
+ DI::pConfig()->set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats']));
}
/* upid pop-up thing */
info(L10n::t('IRC settings saved.') . EOL);
$decrypt_func($signed_address, $trusted_address, $key);
$now = intval(time());
- PConfig::set($uid, "jappixmini", "id:$dfrn_id", "$now:$trusted_address");
+ DI::pConfig()->set($uid, "jappixmini", "id:$dfrn_id", "$now:$trusted_address");
} catch (Exception $e) {
}
$defaultbosh = Config::get("jappixmini", "bosh_address");
if ($defaultbosh != "") {
- PConfig::set(local_user(), 'jappixmini', 'bosh', $defaultbosh);
+ DI::pConfig()->set(local_user(), 'jappixmini', 'bosh', $defaultbosh);
}
$username = DI::pConfig()->get(local_user(), 'jappixmini', 'username');
$purge = 1;
}
- PConfig::set($uid, 'jappixmini', 'username' , $username);
- PConfig::set($uid, 'jappixmini', 'server' , $server);
- PConfig::set($uid, 'jappixmini', 'bosh' , trim($b['jappixmini-bosh']));
- PConfig::set($uid, 'jappixmini', 'password' , trim($b['jappixmini-encrypted-password']));
- PConfig::set($uid, 'jappixmini', 'autosubscribe' , intval($b['jappixmini-autosubscribe']));
- PConfig::set($uid, 'jappixmini', 'autoapprove' , intval($b['jappixmini-autoapprove']));
- PConfig::set($uid, 'jappixmini', 'activate' , intval($b['jappixmini-activate']));
- PConfig::set($uid, 'jappixmini', 'dontinsertchat', intval($b['jappixmini-dont-insertchat']));
- PConfig::set($uid, 'jappixmini', 'encrypt' , $encrypt);
+ DI::pConfig()->set($uid, 'jappixmini', 'username' , $username);
+ DI::pConfig()->set($uid, 'jappixmini', 'server' , $server);
+ DI::pConfig()->set($uid, 'jappixmini', 'bosh' , trim($b['jappixmini-bosh']));
+ DI::pConfig()->set($uid, 'jappixmini', 'password' , trim($b['jappixmini-encrypted-password']));
+ DI::pConfig()->set($uid, 'jappixmini', 'autosubscribe' , intval($b['jappixmini-autosubscribe']));
+ DI::pConfig()->set($uid, 'jappixmini', 'autoapprove' , intval($b['jappixmini-autoapprove']));
+ DI::pConfig()->set($uid, 'jappixmini', 'activate' , intval($b['jappixmini-activate']));
+ DI::pConfig()->set($uid, 'jappixmini', 'dontinsertchat', intval($b['jappixmini-dont-insertchat']));
+ DI::pConfig()->set($uid, 'jappixmini', 'encrypt' , $encrypt);
info('Jappix Mini settings saved.');
if ($purge) {
}
// save address
- PConfig::set($uid, "jappixmini", "id:$dfrn_id", "$now:$decrypted_address");
+ DI::pConfig()->set($uid, "jappixmini", "id:$dfrn_id", "$now:$decrypted_address");
}
}
}
if(! local_user())
return;
if($_POST['krynn-submit'])
- PConfig::set(local_user(),'krynn','enable',intval($_POST['krynn']));
+ DI::pConfig()->set(local_user(),'krynn','enable',intval($_POST['krynn']));
}
}
if (!empty($_POST['langfilter-settings-submit'])) {
- PConfig::set(local_user(), 'langfilter', 'languages', trim($_POST['langfilter_languages']));
+ DI::pConfig()->set(local_user(), 'langfilter', 'languages', trim($_POST['langfilter_languages']));
$enable = (!empty($_POST['langfilter_enable']) ? intval($_POST['langfilter_enable']) : 0);
$disable = 1 - $enable;
- PConfig::set(local_user(), 'langfilter', 'disable', $disable);
+ DI::pConfig()->set(local_user(), 'langfilter', 'disable', $disable);
$minconfidence = 0 + $_POST['langfilter_minconfidence'];
if (!$minconfidence) {
$minconfidence = 0;
} elseif ($minconfidence > 100) {
$minconfidence = 100;
}
- PConfig::set(local_user(), 'langfilter', 'minconfidence', $minconfidence / 100.0);
+ DI::pConfig()->set(local_user(), 'langfilter', 'minconfidence', $minconfidence / 100.0);
$minlength = 0 + $_POST['langfilter_minlength'];
if (!$minlength) {
} elseif ($minlength < 0) {
$minlength = 32;
}
- PConfig::set(local_user(), 'langfilter', 'minlength', $minlength);
+ DI::pConfig()->set(local_user(), 'langfilter', 'minlength', $minlength);
info(L10n::t('Language Filter Settings saved.') . EOL);
}
if(!empty($_POST['libertree-submit'])) {
- PConfig::set(local_user(),'libertree','post',intval($_POST['libertree']));
- PConfig::set(local_user(),'libertree','post_by_default',intval($_POST['libertree_bydefault']));
- PConfig::set(local_user(),'libertree','libertree_api_token',trim($_POST['libertree_api_token']));
- PConfig::set(local_user(),'libertree','libertree_url',trim($_POST['libertree_url']));
+ DI::pConfig()->set(local_user(),'libertree','post',intval($_POST['libertree']));
+ DI::pConfig()->set(local_user(),'libertree','post_by_default',intval($_POST['libertree_bydefault']));
+ DI::pConfig()->set(local_user(),'libertree','libertree_api_token',trim($_POST['libertree_api_token']));
+ DI::pConfig()->set(local_user(),'libertree','libertree_url',trim($_POST['libertree_url']));
}
if(!empty($_POST['ljpost-submit'])) {
- PConfig::set(local_user(),'ljpost','post',intval($_POST['ljpost']));
- PConfig::set(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault']));
- PConfig::set(local_user(),'ljpost','lj_username',trim($_POST['lj_username']));
- PConfig::set(local_user(),'ljpost','lj_password',trim($_POST['lj_password']));
+ DI::pConfig()->set(local_user(),'ljpost','post',intval($_POST['ljpost']));
+ DI::pConfig()->set(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault']));
+ DI::pConfig()->set(local_user(),'ljpost','lj_username',trim($_POST['lj_username']));
+ DI::pConfig()->set(local_user(),'ljpost','lj_password',trim($_POST['lj_password']));
}
function mailstream_addon_settings_post($a,$post) {
if ($_POST['mailstream_address'] != "") {
- PConfig::set(local_user(), 'mailstream', 'address', $_POST['mailstream_address']);
+ DI::pConfig()->set(local_user(), 'mailstream', 'address', $_POST['mailstream_address']);
}
else {
PConfig::delete(local_user(), 'mailstream', 'address');
}
if ($_POST['mailstream_nolikes']) {
- PConfig::set(local_user(), 'mailstream', 'nolikes', $_POST['mailstream_enabled']);
+ DI::pConfig()->set(local_user(), 'mailstream', 'nolikes', $_POST['mailstream_enabled']);
}
else {
PConfig::delete(local_user(), 'mailstream', 'nolikes');
}
if ($_POST['mailstream_enabled']) {
- PConfig::set(local_user(), 'mailstream', 'enabled', $_POST['mailstream_enabled']);
+ DI::pConfig()->set(local_user(), 'mailstream', 'enabled', $_POST['mailstream_enabled']);
}
else {
PConfig::delete(local_user(), 'mailstream', 'enabled');
}
if ($_POST['mailstream_attachimg']) {
- PConfig::set(local_user(), 'mailstream', 'attachimg', $_POST['mailstream_attachimg']);
+ DI::pConfig()->set(local_user(), 'mailstream', 'attachimg', $_POST['mailstream_attachimg']);
}
else {
PConfig::delete(local_user(), 'mailstream', 'attachimg');
return;
}
- PConfig::set(local_user(), 'markdown', 'enabled', intval($_POST['enabled']));
+ DI::pConfig()->set(local_user(), 'markdown', 'enabled', intval($_POST['enabled']));
}
function markdown_post_local_start(App $a, &$request) {
return;
}
- PConfig::set(local_user(), 'mathjax', 'use', intval($_POST['mathjax_use']));
+ DI::pConfig()->set(local_user(), 'mathjax', 'use', intval($_POST['mathjax_use']));
}
function mathjax_settings(App $a, &$s)
return;
}
- PConfig::set(local_user(), 'system', 'no_wall_archive_widget', intval($_POST['notimeline']));
+ DI::pConfig()->set(local_user(), 'system', 'no_wall_archive_widget', intval($_POST['notimeline']));
info(L10n::t('No Timeline settings updated.') . EOL);
}
}
if (!empty($_POST['nsfw-submit'])) {
- PConfig::set(local_user(), 'nsfw', 'words', trim($_POST['nsfw-words']));
+ DI::pConfig()->set(local_user(), 'nsfw', 'words', trim($_POST['nsfw-words']));
$enable = (!empty($_POST['nsfw-enable']) ? intval($_POST['nsfw-enable']) : 0);
$disable = 1 - $enable;
- PConfig::set(local_user(), 'nsfw', 'disable', $disable);
+ DI::pConfig()->set(local_user(), 'nsfw', 'disable', $disable);
info(L10n::t('NSFW Settings saved.') . EOL);
}
}
if(! local_user() || empty($_POST['numfriends-submit']))
return;
- PConfig::set(local_user(),'system','display_friend_count',intval($_POST['numfriends']));
+ DI::pConfig()->set(local_user(),'system','display_friend_count',intval($_POST['numfriends']));
info( L10n::t('Numfriends settings updated.') . EOL);
}
if(! local_user())
return;
if($_POST['planets-submit'])
- PConfig::set(local_user(),'planets','enable',intval($_POST['planets']));
+ DI::pConfig()->set(local_user(),'planets','enable',intval($_POST['planets']));
}
if ((($consumer_key == "") || ($consumer_secret == "")) && ($hostname != "")) {
Logger::log("pumpio_connect: register client");
$clientdata = pumpio_registerclient($a, $hostname);
- PConfig::set(local_user(), 'pumpio', 'consumer_key', $clientdata->client_id);
- PConfig::set(local_user(), 'pumpio', 'consumer_secret', $clientdata->client_secret);
+ DI::pConfig()->set(local_user(), 'pumpio', 'consumer_key', $clientdata->client_id);
+ DI::pConfig()->set(local_user(), 'pumpio', 'consumer_secret', $clientdata->client_secret);
$consumer_key = DI::pConfig()->get(local_user(), 'pumpio', 'consumer_key');
$consumer_secret = DI::pConfig()->get(local_user(), 'pumpio', 'consumer_secret');
if (($success = $client->Process())) {
if (strlen($client->access_token)) {
Logger::log("pumpio_connect: otoken: ".$client->access_token." osecrect: ".$client->access_token_secret, Logger::DEBUG);
- PConfig::set(local_user(), "pumpio", "oauth_token", $client->access_token);
- PConfig::set(local_user(), "pumpio", "oauth_token_secret", $client->access_token_secret);
+ DI::pConfig()->set(local_user(), "pumpio", "oauth_token", $client->access_token);
+ DI::pConfig()->set(local_user(), "pumpio", "oauth_token_secret", $client->access_token_secret);
}
}
$success = $client->Finalize($success);
{
if (!empty($_POST['pumpio-submit'])) {
if (!empty($_POST['pumpio_delete'])) {
- PConfig::set(local_user(), 'pumpio', 'consumer_key' , '');
- PConfig::set(local_user(), 'pumpio', 'consumer_secret' , '');
- PConfig::set(local_user(), 'pumpio', 'oauth_token' , '');
- PConfig::set(local_user(), 'pumpio', 'oauth_token_secret', '');
- PConfig::set(local_user(), 'pumpio', 'post' , false);
- PConfig::set(local_user(), 'pumpio', 'import' , false);
- PConfig::set(local_user(), 'pumpio', 'host' , '');
- PConfig::set(local_user(), 'pumpio', 'user' , '');
- PConfig::set(local_user(), 'pumpio', 'public' , false);
- PConfig::set(local_user(), 'pumpio', 'mirror' , false);
- PConfig::set(local_user(), 'pumpio', 'post_by_default' , false);
- PConfig::set(local_user(), 'pumpio', 'lastdate' , 0);
- PConfig::set(local_user(), 'pumpio', 'last_id' , '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'consumer_key' , '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'consumer_secret' , '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'oauth_token' , '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'oauth_token_secret', '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'post' , false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'import' , false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'host' , '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'user' , '');
+ DI::pConfig()->set(local_user(), 'pumpio', 'public' , false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'mirror' , false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'post_by_default' , false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'lastdate' , 0);
+ DI::pConfig()->set(local_user(), 'pumpio', 'last_id' , '');
} else {
// filtering the username if it is filled wrong
$user = $_POST['pumpio_user'];
$host = trim($host);
$host = str_replace(["https://", "http://"], ["", ""], $host);
- PConfig::set(local_user(), 'pumpio', 'post' , $_POST['pumpio'] ?? false);
- PConfig::set(local_user(), 'pumpio', 'import' , $_POST['pumpio_import'] ?? false);
- PConfig::set(local_user(), 'pumpio', 'host' , $host);
- PConfig::set(local_user(), 'pumpio', 'user' , $user);
- PConfig::set(local_user(), 'pumpio', 'public' , $_POST['pumpio_public'] ?? false);
- PConfig::set(local_user(), 'pumpio', 'mirror' , $_POST['pumpio_mirror'] ?? false);
- PConfig::set(local_user(), 'pumpio', 'post_by_default', $_POST['pumpio_bydefault'] ?? false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'post' , $_POST['pumpio'] ?? false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'import' , $_POST['pumpio_import'] ?? false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'host' , $host);
+ DI::pConfig()->set(local_user(), 'pumpio', 'user' , $user);
+ DI::pConfig()->set(local_user(), 'pumpio', 'public' , $_POST['pumpio_public'] ?? false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'mirror' , $_POST['pumpio_mirror'] ?? false);
+ DI::pConfig()->set(local_user(), 'pumpio', 'post_by_default', $_POST['pumpio_bydefault'] ?? false);
if (!empty($_POST['pumpio_mirror'])) {
PConfig::delete(local_user(), 'pumpio', 'lastdate');
if ($success) {
if ($user->generator->displayName) {
- PConfig::set($b["uid"], "pumpio", "application_name", $user->generator->displayName);
+ DI::pConfig()->set($b["uid"], "pumpio", "application_name", $user->generator->displayName);
}
$post_id = $user->object->id;
if ($next_contact_check <= time()) {
pumpio_getallusers($a, $rr["uid"]);
- PConfig::set($rr['uid'], 'pumpio', 'contact_check', time());
+ DI::pConfig()->set($rr['uid'], 'pumpio', 'contact_check', time());
}
}
}
}
if ($lastdate != 0) {
- PConfig::set($uid, 'pumpio', 'lastdate', $lastdate);
+ DI::pConfig()->set($uid, 'pumpio', 'lastdate', $lastdate);
}
}
pumpio_fetchallcomments($a, $uid, $item["uri"]);
}
- PConfig::set($uid, 'pumpio', 'last_id', $last_id);
+ DI::pConfig()->set($uid, 'pumpio', 'last_id', $last_id);
}
function pumpio_getallusers(App &$a, $uid)
}
if ($_POST['qcomment-submit']) {
- PConfig::set(local_user(), 'qcomment', 'words', XML::escape($_POST['qcomment-words']));
+ DI::pConfig()->set(local_user(), 'qcomment', 'words', XML::escape($_POST['qcomment-words']));
info(L10n::t('Quick Comment settings saved.') . EOL);
}
}
if(! local_user())
return;
if($_POST['randplace-submit'])
- PConfig::set(local_user(),'randplace','enable',intval($_POST['randplace']));
+ DI::pConfig()->set(local_user(),'randplace','enable',intval($_POST['randplace']));
}
if(! local_user() || empty($_POST['remote-perms-submit']))
return;
- PConfig::set(local_user(),'remote_perms','show',intval($_POST['remote-perms']));
+ DI::pConfig()->set(local_user(),'remote_perms','show',intval($_POST['remote-perms']));
info(L10n::t('Remote Permissions settings updated.') . EOL);
}
}
if ($_POST['securemail-submit']) {
- PConfig::set(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey']));
+ DI::pConfig()->set(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey']));
$enable = (!empty($_POST['securemail-enable']) ? 1 : 0);
- PConfig::set(local_user(), 'securemail', 'enable', $enable);
+ DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
info(L10n::t('Secure Mail Settings saved.') . EOL);
if ($_POST['securemail-submit'] == L10n::t('Save and send test')) {
];
// enable addon for test
- PConfig::set(local_user(), 'securemail', 'enable', 1);
+ DI::pConfig()->set(local_user(), 'securemail', 'enable', 1);
$res = Emailer::send($params);
// revert to saved value
- PConfig::set(local_user(), 'securemail', 'enable', $enable);
+ DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
if ($res) {
info(L10n::t('Test email sent') . EOL);
}
if (!empty($_POST['showmore-submit'])) {
- PConfig::set(local_user(), 'showmore', 'chars', trim($_POST['showmore-chars']));
+ DI::pConfig()->set(local_user(), 'showmore', 'chars', trim($_POST['showmore-chars']));
$enable = (!empty($_POST['showmore-enable']) ? intval($_POST['showmore-enable']) : 0);
$disable = 1-$enable;
- PConfig::set(local_user(), 'showmore', 'disable', $disable);
+ DI::pConfig()->set(local_user(), 'showmore', 'disable', $disable);
info(L10n::t('Show More Settings saved.') . EOL);
}
}
}
if (!empty($_POST['startpage-submit'])) {
- PConfig::set(local_user(), 'startpage', 'startpage', strip_tags(trim($_POST['startpage'])));
+ DI::pConfig()->set(local_user(), 'startpage', 'startpage', strip_tags(trim($_POST['startpage'])));
}
}
$apibase = $asn['apiurl'];
$c = Network::fetchUrl($apibase . 'statusnet/version.xml');
if (strlen($c) > 0) {
- PConfig::set(local_user(), 'statusnet', 'consumerkey', $asn['consumerkey']);
- PConfig::set(local_user(), 'statusnet', 'consumersecret', $asn['consumersecret']);
- PConfig::set(local_user(), 'statusnet', 'baseapi', $asn['apiurl']);
- //PConfig::set(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
+ DI::pConfig()->set(local_user(), 'statusnet', 'consumerkey', $asn['consumerkey']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'consumersecret', $asn['consumersecret']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $asn['apiurl']);
+ //DI::pConfig()->set(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
} else {
notice(L10n::t('Please contact your site administrator.<br />The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
}
$c = Network::fetchUrl($apibase . 'statusnet/version.xml');
if (strlen($c) > 0) {
// ok the API path is correct, let's save the settings
- PConfig::set(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
- PConfig::set(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
- PConfig::set(local_user(), 'statusnet', 'baseapi', $apibase);
- //PConfig::set(local_user(), 'statusnet', 'application_name', $_POST['statusnet-applicationname'] );
+ DI::pConfig()->set(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $apibase);
+ //DI::pConfig()->set(local_user(), 'statusnet', 'application_name', $_POST['statusnet-applicationname'] );
} else {
// the API path is not correct, maybe missing trailing / ?
$apibase = $apibase . '/';
$c = Network::fetchUrl($apibase . 'statusnet/version.xml');
if (strlen($c) > 0) {
// ok the API path is now correct, let's save the settings
- PConfig::set(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
- PConfig::set(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
- PConfig::set(local_user(), 'statusnet', 'baseapi', $apibase);
+ DI::pConfig()->set(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $apibase);
} else {
// still not the correct API base, let's do noting
notice(L10n::t('We could not contact the GNU Social API with the Path you entered.') . EOL);
$connection = new StatusNetOAuth($api, $ckey, $csecret, $_POST['statusnet-token'], $_POST['statusnet-token2']);
$token = $connection->getAccessToken($_POST['statusnet-pin']);
// ok, now that we have the Access Token, save them in the user config
- PConfig::set(local_user(), 'statusnet', 'oauthtoken', $token['oauth_token']);
- PConfig::set(local_user(), 'statusnet', 'oauthsecret', $token['oauth_token_secret']);
- PConfig::set(local_user(), 'statusnet', 'post', 1);
- PConfig::set(local_user(), 'statusnet', 'post_taglinks', 1);
+ DI::pConfig()->set(local_user(), 'statusnet', 'oauthtoken', $token['oauth_token']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'oauthsecret', $token['oauth_token_secret']);
+ DI::pConfig()->set(local_user(), 'statusnet', 'post', 1);
+ DI::pConfig()->set(local_user(), 'statusnet', 'post_taglinks', 1);
// reload the Addon Settings page, if we don't do it see Bug #42
DI::baseUrl()->redirect('settings/connectors');
} else {
// if no PIN is supplied in the POST variables, the user has changed the setting
// to post a dent for every new __public__ posting to the wall
- PConfig::set(local_user(), 'statusnet', 'post', intval($_POST['statusnet-enable']));
- PConfig::set(local_user(), 'statusnet', 'post_by_default', intval($_POST['statusnet-default']));
- PConfig::set(local_user(), 'statusnet', 'mirror_posts', intval($_POST['statusnet-mirror']));
- PConfig::set(local_user(), 'statusnet', 'import', intval($_POST['statusnet-import']));
- PConfig::set(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user']));
+ DI::pConfig()->set(local_user(), 'statusnet', 'post', intval($_POST['statusnet-enable']));
+ DI::pConfig()->set(local_user(), 'statusnet', 'post_by_default', intval($_POST['statusnet-default']));
+ DI::pConfig()->set(local_user(), 'statusnet', 'mirror_posts', intval($_POST['statusnet-mirror']));
+ DI::pConfig()->set(local_user(), 'statusnet', 'import', intval($_POST['statusnet-import']));
+ DI::pConfig()->set(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user']));
if (!intval($_POST['statusnet-mirror']))
PConfig::delete(local_user(), 'statusnet', 'lastid');
$dent = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret);
$max_char = $dent->get_maxlength(); // max. length for a dent
- PConfig::set($b['uid'], 'statusnet', 'max_char', $max_char);
+ DI::pConfig()->set($b['uid'], 'statusnet', 'max_char', $max_char);
$tempfile = "";
$msgarr = ItemContent::getPlaintextPost($b, $max_char, true, 7);
"\nmessage: " . $msg . "\nOriginal post: " . print_r($b, true) . "\nPost Data: " . print_r($postdata, true), Logger::DEBUG);
if (!empty($result->source)) {
- PConfig::set($b["uid"], "statusnet", "application_name", strip_tags($result->source));
+ DI::pConfig()->set($b["uid"], "statusnet", "application_name", strip_tags($result->source));
}
if (!empty($result->error)) {
}
}
}
- PConfig::set($uid, 'statusnet', 'lastid', $lastid);
+ DI::pConfig()->set($uid, 'statusnet', 'lastid', $lastid);
}
function statusnet_address($contact)
}
}
}
- PConfig::set($uid, 'statusnet', 'lasthometimelineid', $lastid);
+ DI::pConfig()->set($uid, 'statusnet', 'lasthometimelineid', $lastid);
}
// Fetching mentions
}
}
- PConfig::set($uid, 'statusnet', 'lastmentionid', $lastid);
+ DI::pConfig()->set($uid, 'statusnet', 'lastmentionid', $lastid);
}
function statusnet_complete_conversation(App $a, $uid, $self, $create_user, $nick, $conversation)
return false;
}
- PConfig::set($uid, 'statusnet', 'own_url', Strings::normaliseLink($user->statusnet_profile_url));
+ DI::pConfig()->set($uid, 'statusnet', 'own_url', Strings::normaliseLink($user->statusnet_profile_url));
$contact_id = statusnet_fetch_contact($uid, $user, true);
} else {
}
if (!empty($_POST['superblock-submit'])) {
- PConfig::set(local_user(), 'system', 'blocked',trim($_POST['superblock-words']));
+ DI::pConfig()->set(local_user(), 'system', 'blocked',trim($_POST['superblock-words']));
info(L10n::t('SUPERBLOCK Settings saved.') . EOL);
}
}
$words .= trim($_GET['block']);
}
- PConfig::set(local_user(), 'system', 'blocked', $words);
+ DI::pConfig()->set(local_user(), 'system', 'blocked', $words);
info(L10n::t('superblock settings updated') . EOL );
exit();
}
}
// What's next? Now that we have an Access Token and Secret, we can make an API call.
- PConfig::set(local_user(), "tumblr", "oauth_token", $access_token['oauth_token']);
- PConfig::set(local_user(), "tumblr", "oauth_token_secret", $access_token['oauth_token_secret']);
+ DI::pConfig()->set(local_user(), "tumblr", "oauth_token", $access_token['oauth_token']);
+ DI::pConfig()->set(local_user(), "tumblr", "oauth_token_secret", $access_token['oauth_token_secret']);
$o = L10n::t("You are now authenticated to tumblr.");
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
function tumblr_settings_post(App $a, array &$b)
{
if (!empty($_POST['tumblr-submit'])) {
- PConfig::set(local_user(), 'tumblr', 'post', intval($_POST['tumblr']));
- PConfig::set(local_user(), 'tumblr', 'page', $_POST['tumblr_page']);
- PConfig::set(local_user(), 'tumblr', 'post_by_default', intval($_POST['tumblr_bydefault']));
+ DI::pConfig()->set(local_user(), 'tumblr', 'post', intval($_POST['tumblr']));
+ DI::pConfig()->set(local_user(), 'tumblr', 'page', $_POST['tumblr_page']);
+ DI::pConfig()->set(local_user(), 'tumblr', 'post_by_default', intval($_POST['tumblr_bydefault']));
}
}
$connection = new TwitterOAuth($ckey, $csecret, $_POST['twitter-token'], $_POST['twitter-token2']);
$token = $connection->oauth("oauth/access_token", ["oauth_verifier" => $_POST['twitter-pin']]);
// ok, now that we have the Access Token, save them in the user config
- PConfig::set(local_user(), 'twitter', 'oauthtoken', $token['oauth_token']);
- PConfig::set(local_user(), 'twitter', 'oauthsecret', $token['oauth_token_secret']);
- PConfig::set(local_user(), 'twitter', 'post', 1);
+ DI::pConfig()->set(local_user(), 'twitter', 'oauthtoken', $token['oauth_token']);
+ DI::pConfig()->set(local_user(), 'twitter', 'oauthsecret', $token['oauth_token_secret']);
+ DI::pConfig()->set(local_user(), 'twitter', 'post', 1);
} catch(Exception $e) {
info($e->getMessage());
} catch(TwitterOAuthException $e) {
} else {
// if no PIN is supplied in the POST variables, the user has changed the setting
// to post a tweet for every new __public__ posting to the wall
- PConfig::set(local_user(), 'twitter', 'post', intval($_POST['twitter-enable']));
- PConfig::set(local_user(), 'twitter', 'post_by_default', intval($_POST['twitter-default']));
- PConfig::set(local_user(), 'twitter', 'mirror_posts', intval($_POST['twitter-mirror']));
- PConfig::set(local_user(), 'twitter', 'import', intval($_POST['twitter-import']));
- PConfig::set(local_user(), 'twitter', 'create_user', intval($_POST['twitter-create_user']));
+ DI::pConfig()->set(local_user(), 'twitter', 'post', intval($_POST['twitter-enable']));
+ DI::pConfig()->set(local_user(), 'twitter', 'post_by_default', intval($_POST['twitter-default']));
+ DI::pConfig()->set(local_user(), 'twitter', 'mirror_posts', intval($_POST['twitter-mirror']));
+ DI::pConfig()->set(local_user(), 'twitter', 'import', intval($_POST['twitter-import']));
+ DI::pConfig()->set(local_user(), 'twitter', 'create_user', intval($_POST['twitter-create_user']));
if (!intval($_POST['twitter-mirror'])) {
PConfig::delete(local_user(), 'twitter', 'lastid');
if($next_contact_check <= time()) {
pumpio_getallusers($a, $rr["uid"]);
- PConfig::set($rr['uid'],'pumpio','contact_check',time());
+ DI::pConfig()->set($rr['uid'],'pumpio','contact_check',time());
}
*/
}
foreach ($posts as $post) {
if ($post->id_str > $lastid) {
$lastid = $post->id_str;
- PConfig::set($uid, 'twitter', 'lastid', $lastid);
+ DI::pConfig()->set($uid, 'twitter', 'lastid', $lastid);
}
if ($first_time) {
}
}
}
- PConfig::set($uid, 'twitter', 'lastid', $lastid);
+ DI::pConfig()->set($uid, 'twitter', 'lastid', $lastid);
Logger::log('Last ID for user ' . $uid . ' is now ' . $lastid, Logger::DEBUG);
}
foreach ($posts as $post) {
if ($post->id_str > $lastid) {
$lastid = $post->id_str;
- PConfig::set($uid, 'twitter', 'lasthometimelineid', $lastid);
+ DI::pConfig()->set($uid, 'twitter', 'lasthometimelineid', $lastid);
}
if ($first_time) {
Logger::log('User ' . $uid . ' posted home timeline item ' . $item);
}
}
- PConfig::set($uid, 'twitter', 'lasthometimelineid', $lastid);
+ DI::pConfig()->set($uid, 'twitter', 'lasthometimelineid', $lastid);
Logger::log('Last timeline ID for user ' . $uid . ' is now ' . $lastid, Logger::DEBUG);
}
}
- PConfig::set($uid, 'twitter', 'lastmentionid', $lastid);
+ DI::pConfig()->set($uid, 'twitter', 'lastmentionid', $lastid);
Logger::log('Last mentions ID for user ' . $uid . ' is now ' . $lastid, Logger::DEBUG);
}
return false;
}
- PConfig::set($uid, 'twitter', 'own_id', $user->id_str);
+ DI::pConfig()->set($uid, 'twitter', 'own_id', $user->id_str);
$contact_id = twitter_fetch_contact($uid, $user, true);
} else {
$key = DI::pConfig()->get(local_user(), 'widgets', 'key' );
- if ($key=='') { $key = mt_rand(); PConfig::set(local_user(), 'widgets', 'key', $key); }
+ if ($key=='') { $key = mt_rand(); DI::pConfig()->set(local_user(), 'widgets', 'key', $key); }
$widgets = [];
$d = dir(dirname(__file__));
return;
}
$enable = intval($_POST['windowsphonepush']);
- PConfig::set(local_user(), 'windowsphonepush', 'enable', $enable);
+ DI::pConfig()->set(local_user(), 'windowsphonepush', 'enable', $enable);
if ($enable) {
- PConfig::set(local_user(), 'windowsphonepush', 'counterunseen', 0);
+ DI::pConfig()->set(local_user(), 'windowsphonepush', 'counterunseen', 0);
}
- PConfig::set(local_user(), 'windowsphonepush', 'senditemtext', intval($_POST['windowsphonepush-senditemtext']));
+ DI::pConfig()->set(local_user(), 'windowsphonepush', 'senditemtext', intval($_POST['windowsphonepush-senditemtext']));
info(L10n::t('WindowsPhonePush settings updated.') . EOL);
}
switch (trim($res_tile)) {
case "Received":
// ok, count has been pushed, let's save it in personal settings
- PConfig::set($rr['uid'], 'windowsphonepush', 'counterunseen', $count[0]['count']);
+ DI::pConfig()->set($rr['uid'], 'windowsphonepush', 'counterunseen', $count[0]['count']);
break;
case "QueueFull":
// maximum of 30 messages reached, server rejects any further push notification until device reconnects
// further log information done on count pushing with send_tile (see above)
$res_toast = send_toast($device_url, $author, $body);
if (trim($res_toast) === 'Received') {
- PConfig::set($rr['uid'], 'windowsphonepush', 'lastpushid', $count[0]['max']);
+ DI::pConfig()->set($rr['uid'], 'windowsphonepush', 'lastpushid', $count[0]['max']);
}
}
}
// and log this fact
$subscriptionStatus = get_header_value($output, 'X-SubscriptionStatus');
if ($subscriptionStatus == "Expired") {
- PConfig::set(local_user(), 'windowsphonepush', 'device_url', "");
+ DI::pConfig()->set(local_user(), 'windowsphonepush', 'device_url', "");
Logger::log("ERROR: the stored Device-URL " . $device_url . "returned an 'Expired' error, it has been deleted now.");
}
`v` = '" . $device_url . "'");
if (count($r)) {
foreach ($r as $rr) {
- PConfig::set($rr['uid'], 'windowsphonepush', 'device_url', '');
+ DI::pConfig()->set($rr['uid'], 'windowsphonepush', 'device_url', '');
Logger::log("WARN: the sent URL was already registered with user '" . $rr['uid'] . "'. Deleted for this user as we expect to be correct now for user '" . local_user() . "'.");
}
}
- PConfig::set(local_user(), 'windowsphonepush', 'device_url', $device_url);
+ DI::pConfig()->set(local_user(), 'windowsphonepush', 'device_url', $device_url);
// output the successfull update of the device URL to the logger for error analysis if necessary
Logger::log("INFO: Device-URL for user '" . local_user() . "' has been updated with '" . $device_url . "'");
return "Device-URL updated successfully!";
return "Plug-in not enabled";
}
- PConfig::set(local_user(), 'windowsphonepush', 'counterunseen', 0);
+ DI::pConfig()->set(local_user(), 'windowsphonepush', 'counterunseen', 0);
return "Counter set to zero";
}
function wppost_settings_post(&$a,&$b) {
if(!empty($_POST['wppost-submit'])) {
- PConfig::set(local_user(),'wppost','post',intval($_POST['wppost']));
- PConfig::set(local_user(),'wppost','post_by_default',intval($_POST['wp_bydefault'] ?? false));
- PConfig::set(local_user(),'wppost','wp_username',trim($_POST['wp_username']));
- PConfig::set(local_user(),'wppost','wp_password',trim($_POST['wp_password']));
- PConfig::set(local_user(),'wppost','wp_blog',trim($_POST['wp_blog']));
- PConfig::set(local_user(),'wppost','backlink',trim($_POST['wp_backlink'] ?? ''));
- PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
+ DI::pConfig()->set(local_user(),'wppost','post',intval($_POST['wppost']));
+ DI::pConfig()->set(local_user(),'wppost','post_by_default',intval($_POST['wp_bydefault'] ?? false));
+ DI::pConfig()->set(local_user(),'wppost','wp_username',trim($_POST['wp_username']));
+ DI::pConfig()->set(local_user(),'wppost','wp_password',trim($_POST['wp_password']));
+ DI::pConfig()->set(local_user(),'wppost','wp_blog',trim($_POST['wp_blog']));
+ DI::pConfig()->set(local_user(),'wppost','backlink',trim($_POST['wp_backlink'] ?? ''));
+ DI::pConfig()->set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
$wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text']));
$wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
$wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true);
- PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
+ DI::pConfig()->set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
}
}
return;
}
- PConfig::set(local_user(), 'xmpp', 'enabled', $_POST['xmpp_enabled'] ?? false);
- PConfig::set(local_user(), 'xmpp', 'individual', $_POST['xmpp_individual'] ?? false);
- PConfig::set(local_user(), 'xmpp', 'bosh_proxy', $_POST['xmpp_bosh_proxy'] ?? '');
+ DI::pConfig()->set(local_user(), 'xmpp', 'enabled', $_POST['xmpp_enabled'] ?? false);
+ DI::pConfig()->set(local_user(), 'xmpp', 'individual', $_POST['xmpp_individual'] ?? false);
+ DI::pConfig()->set(local_user(), 'xmpp', 'bosh_proxy', $_POST['xmpp_bosh_proxy'] ?? '');
info(L10n::t('XMPP settings updated.') . EOL);
}
{
if (empty($_SESSION['allow_api'])) {
$password = Strings::getRandomHex(16);
- PConfig::set(local_user(), 'xmpp', 'password', $password);
+ DI::pConfig()->set(local_user(), 'xmpp', 'password', $password);
}
}
if ($password == "") {
$password = Strings::getRandomHex(16);
- PConfig::set(local_user(), "xmpp", "password", $password);
+ DI::pConfig()->set(local_user(), "xmpp", "password", $password);
}
$jid = $a->user["nickname"] . "@" . DI::baseUrl()->getHostname() . "/converse-" . Strings::getRandomHex(5);