]> git.mxchange.org Git - friendica-addons.git/blobdiff - xmpp/xmpp.php
Remove App::get_cached_avatar_image method
[friendica-addons.git] / xmpp / xmpp.php
index e523c65c5fe3fcccb954f01c6d94d1d2bfca3f34..ba8c27c7f80d39d8072e27486db4c425937d7944 100644 (file)
@@ -103,11 +103,11 @@ function xmpp_plugin_admin(App $a, &$o)
 {
        $t = get_markup_template("admin.tpl", "addon/xmpp/");
 
-       $o = replace_macros($t, array(
+       $o = replace_macros($t, [
                '$submit' => t('Save Settings'),
-               '$bosh_proxy' => array('bosh_proxy', t('Jabber BOSH host'), Config::get('xmpp', 'bosh_proxy'), ''),
-               '$central_userbase' => array('central_userbase', t('Use central userbase'), Config::get('xmpp', 'central_userbase'), t('If enabled, users will automatically login to an ejabberd server that has to be installed on this machine with synchronized credentials via the "auth_ejabberd.php" script.')),
-       ));
+               '$bosh_proxy' => ['bosh_proxy', t('Jabber BOSH host'), Config::get('xmpp', 'bosh_proxy'), ''],
+               '$central_userbase' => ['central_userbase', t('Use central userbase'), Config::get('xmpp', 'central_userbase'), t('If enabled, users will automatically login to an ejabberd server that has to be installed on this machine with synchronized credentials via the "auth_ejabberd.php" script.')],
+       ]);
 }
 
 function xmpp_plugin_admin_post()
@@ -142,7 +142,7 @@ function xmpp_converse(App $a)
                return;
        }
 
-       if (in_array($a->query_string, array("admin/federation/"))) {
+       if (in_array($a->query_string, ["admin/federation/"])) {
                return;
        }
 
@@ -152,7 +152,7 @@ function xmpp_converse(App $a)
        if (Config::get("xmpp", "central_userbase") && !PConfig::get(local_user(), "xmpp", "individual")) {
                $bosh_proxy = Config::get("xmpp", "bosh_proxy");
 
-               $password = PConfig::get(local_user(), "xmpp", "password");
+               $password = PConfig::get(local_user(), "xmpp", "password", '', true);
 
                if ($password == "") {
                        $password = random_string(16);
@@ -176,7 +176,7 @@ function xmpp_converse(App $a)
                return;
        }
 
-       if (in_array($a->argv[0], array("manage", "logout"))) {
+       if (in_array($a->argv[0], ["manage", "logout"])) {
                $additional_commands = "converse.user.logout();\n";
        } else {
                $additional_commands = "";