aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/main.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-02-18 01:34:25 +0100
committerKevin Chabowski <kevin@kch42.de>2012-02-18 01:34:25 +0100
commit7e04592b5c86352425906bb754c38a8fbea53b09 (patch)
treeefa0caab141a7ad3d72256ffad5378c36c56e51a /ratatoeskr/main.php
parent0861240931fca9e2124703cda8b1a815a838465d (diff)
downloadratatoeskr-cms-7e04592b5c86352425906bb754c38a8fbea53b09.tar.gz
ratatoeskr-cms-7e04592b5c86352425906bb754c38a8fbea53b09.tar.bz2
ratatoeskr-cms-7e04592b5c86352425906bb754c38a8fbea53b09.zip
Incompatible plugins will now get disabled.
Diffstat (limited to 'ratatoeskr/main.php')
-rw-r--r--ratatoeskr/main.php9
1 files changed, 8 insertions, 1 deletions
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)