X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=jappixmini%2Fjappixmini.php;h=904991534efa35a065e96f8394f8c5354f9b8267;hb=c3e93f1ed9a487f823bcc75ddd43024334c25bfc;hp=adbea67551c90a6cf583e5e5d26a89fdc045494e;hpb=bc637287335bc1341de2f52769312e0a074e3501;p=friendica-addons.git
diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php
index adbea675..90499153 100644
--- a/jappixmini/jappixmini.php
+++ b/jappixmini/jappixmini.php
@@ -63,6 +63,9 @@ json({"status":"ok", "encrypted_address":"%s"})
*/
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
+
function jappixmini_install() {
register_hook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
register_hook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
@@ -76,20 +79,20 @@ register_hook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
register_hook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
// set standard configuration
-$info_text = get_config("jappixmini", "infotext");
-if (!$info_text) set_config("jappixmini", "infotext",
+$info_text = Config::get("jappixmini", "infotext");
+if (!$info_text) set_confConfig::setig("jappixmini", "infotext",
"To get the chat working, you need to know a BOSH host which works with your Jabber account. ".
"An example of a BOSH server that works for all accounts is https://bind.jappix.com/, but keep ".
"in mind that the BOSH server can read along all chat messages. If you know that your Jabber ".
"server also provides an own BOSH server, it is much better to use this one!"
);
-$bosh_proxy = get_config("jappixmini", "bosh_proxy");
-if ($bosh_proxy==="") set_config("jappixmini", "bosh_proxy", "1");
+$bosh_proxy = Config::get("jappixmini", "bosh_proxy");
+if ($bosh_proxy==="") Config::set("jappixmini", "bosh_proxy", "1");
// set addon version so that safe updates are possible later
-$addon_version = get_config("jappixmini", "version");
-if ($addon_version==="") set_config("jappixmini", "version", "1");
+$addon_version = Config::get("jappixmini", "version");
+if ($addon_version==="") Config::set("jappixmini", "version", "1");
}
@@ -113,33 +116,33 @@ function jappixmini_plugin_admin(&$a, &$o) {
}
// warn if cron job has not yet been executed
- $cron_run = get_config("jappixmini", "last_cron_execution");
+ $cron_run = Config::get("jappixmini", "last_cron_execution");
if (!$cron_run) $o .= "
Warning: The cron job has not yet been executed. If this message is still there after some time (usually 10 minutes), this means that autosubscribe and autoaccept will not work.