+
+ $a = get_app();
+
+ // If the plugin "statistics_json" is enabled then disable it and actrivate nodeinfo.
+ if (plugin_enabled("statistics_json")) {
+ set_config("system", "nodeinfo", true);
+
+ $plugin = "statistics_json";
+ $plugins = get_config("system","addon");
+ $plugins_arr = array();
+
+ if($plugins) {
+ $plugins_arr = explode(",",str_replace(" ", "",$plugins));
+
+ $idx = array_search($plugin, $plugins_arr);
+ if ($idx !== false){
+ unset($plugins_arr[$idx]);
+ uninstall_plugin($plugin);
+ set_config("system","addon", implode(", ",$plugins_arr));
+ }
+ }
+ }
+