From 7e04592b5c86352425906bb754c38a8fbea53b09 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 18 Feb 2012 01:34:25 +0100 Subject: Incompatible plugins will now get disabled. --- ratatoeskr/main.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ratatoeskr/main.php') diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php index 9e4f08a..dee6d8d 100644 --- a/ratatoeskr/main.php +++ b/ratatoeskr/main.php @@ -43,7 +43,7 @@ function ratatoeskr() function _ratatoeskr() { - global $backend_subactions, $ste, $url_handlers, $ratatoeskr_settings, $plugin_objs; + global $backend_subactions, $ste, $url_handlers, $ratatoeskr_settings, $plugin_objs, $api_compat; $ts_start = microtime(True); @@ -60,6 +60,13 @@ function _ratatoeskr() $activeplugins = array_filter(Plugin::all(), function($plugin) { return $plugin->active; }); foreach($activeplugins as $plugin) { + if(!in_array($plugin->api, $api_compat)) + { + $plugin->active = False; + $plugin->save(); + continue; + } + eval($plugin->code); $plugin_obj = new $plugin->classname($plugin->get_id()); if($plugin->update) -- cgit v1.2.3-70-g09d2