aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/plugin.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 5afded542..bd844442f 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -325,7 +325,8 @@ function get_plugin_info($plugin){
'description' => '',
'author' => array(),
'maintainer' => array(),
- 'version' => ''
+ 'version' => '',
+ 'requires' => ''
);
if (!is_file("addon/$plugin/$plugin.php"))
@@ -383,6 +384,22 @@ function check_plugin_versions($info) {
}
}
+ if(array_key_exists('requires',$info)) {
+ $arr = explode(',',$info['requires']);
+ $found = true;
+ if($arr) {
+ foreach($arr as $test) {
+ $test = trim($test);
+ if(! $test)
+ continue;
+ if(! in_array($test,get_app()->plugins))
+ $found = false;
+ }
+ }
+ if(! $found)
+ return false;
+ }
+
return true;
}