diff options
author | jeroenpraat <jeroenpraat@xs4all.nl> | 2016-02-25 02:05:16 +0100 |
---|---|---|
committer | jeroenpraat <jeroenpraat@xs4all.nl> | 2016-02-25 02:05:16 +0100 |
commit | f12b0fe316a4a1c285935a30b282ef82c1b0f6a5 (patch) | |
tree | e95c1d6d5fb64315fa3afedf3132daf6fbeaaac5 /include/plugin.php | |
parent | 8944d7a7a226601e4b32ea7f7febc166a3ce272d (diff) | |
parent | 6300f47cdcd921141b8f98b71d373d53aa3d80f2 (diff) | |
download | volse-hubzilla-f12b0fe316a4a1c285935a30b282ef82c1b0f6a5.tar.gz volse-hubzilla-f12b0fe316a4a1c285935a30b282ef82c1b0f6a5.tar.bz2 volse-hubzilla-f12b0fe316a4a1c285935a30b282ef82c1b0f6a5.zip |
Merge branch 'master' of https://github.com/redmatrix/hubzilla
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-x | include/plugin.php | 19 |
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; } |