mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Move PConfig::get() to DI::pConfig()->get()
This commit is contained in:
parent
2a35176588
commit
ea3a9052d8
42 changed files with 414 additions and 412 deletions
|
@ -57,13 +57,13 @@ function xmpp_addon_settings(App $a, &$s)
|
|||
|
||||
/* Get the current state of our config variable */
|
||||
|
||||
$enabled = intval(PConfig::get(local_user(), 'xmpp', 'enabled'));
|
||||
$enabled = intval(DI::pConfig()->get(local_user(), 'xmpp', 'enabled'));
|
||||
$enabled_checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
|
||||
$individual = intval(PConfig::get(local_user(), 'xmpp', 'individual'));
|
||||
$individual = intval(DI::pConfig()->get(local_user(), 'xmpp', 'individual'));
|
||||
$individual_checked = (($individual) ? ' checked="checked" ' : '');
|
||||
|
||||
$bosh_proxy = PConfig::get(local_user(), "xmpp", "bosh_proxy");
|
||||
$bosh_proxy = DI::pConfig()->get(local_user(), "xmpp", "bosh_proxy");
|
||||
|
||||
/* Add some HTML to the existing form */
|
||||
$s .= '<span id="settings_xmpp_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_xmpp_expanded\'); openClose(\'settings_xmpp_inflated\');">';
|
||||
|
@ -85,7 +85,7 @@ function xmpp_addon_settings(App $a, &$s)
|
|||
$s .= '<div class="clear"></div>';
|
||||
}
|
||||
|
||||
if (!Config::get("xmpp", "central_userbase") || PConfig::get(local_user(), "xmpp", "individual")) {
|
||||
if (!Config::get("xmpp", "central_userbase") || DI::pConfig()->get(local_user(), "xmpp", "individual")) {
|
||||
$s .= '<label id="xmpp-bosh-proxy-label" for="xmpp-bosh-proxy">' . L10n::t('Jabber BOSH host') . '</label>';
|
||||
$s .= ' <input id="xmpp-bosh-proxy" type="text" name="xmpp_bosh_proxy" value="' . $bosh_proxy . '" />';
|
||||
$s .= '<div class="clear"></div>';
|
||||
|
@ -147,7 +147,7 @@ function xmpp_converse(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!PConfig::get(local_user(), "xmpp", "enabled")) {
|
||||
if (!DI::pConfig()->get(local_user(), "xmpp", "enabled")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -158,10 +158,10 @@ function xmpp_converse(App $a)
|
|||
DI::page()['htmlhead'] .= '<link type="text/css" rel="stylesheet" media="screen" href="addon/xmpp/converse/css/converse.css" />' . "\n";
|
||||
DI::page()['htmlhead'] .= '<script src="addon/xmpp/converse/builds/converse.min.js"></script>' . "\n";
|
||||
|
||||
if (Config::get("xmpp", "central_userbase") && !PConfig::get(local_user(), "xmpp", "individual")) {
|
||||
if (Config::get("xmpp", "central_userbase") && !DI::pConfig()->get(local_user(), "xmpp", "individual")) {
|
||||
$bosh_proxy = Config::get("xmpp", "bosh_proxy");
|
||||
|
||||
$password = PConfig::get(local_user(), "xmpp", "password", '', true);
|
||||
$password = DI::pConfig()->get(local_user(), "xmpp", "password", '', true);
|
||||
|
||||
if ($password == "") {
|
||||
$password = Strings::getRandomHex(16);
|
||||
|
@ -176,7 +176,7 @@ function xmpp_converse(App $a)
|
|||
password: '$password',
|
||||
allow_logout: false,";
|
||||
} else {
|
||||
$bosh_proxy = PConfig::get(local_user(), "xmpp", "bosh_proxy");
|
||||
$bosh_proxy = DI::pConfig()->get(local_user(), "xmpp", "bosh_proxy");
|
||||
|
||||
$auto_login = "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue