aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-25 06:05:12 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-25 06:05:12 +0100
commit21f2df399d3e21b6322ece16717efe88bcc21621 (patch)
tree1f6bcf44e803c1ef723b546eb4fcd83dc5f82e87 /include/plugin.php
parentddeab48f9b314eed067c31086945acee33964d37 (diff)
parent43521bb10b71752b5b3fd953056966ba30df50b6 (diff)
downloadvolse-hubzilla-21f2df399d3e21b6322ece16717efe88bcc21621.tar.gz
volse-hubzilla-21f2df399d3e21b6322ece16717efe88bcc21621.tar.bz2
volse-hubzilla-21f2df399d3e21b6322ece16717efe88bcc21621.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/plugin.php')
-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;
}