diff options
author | git-marijus <mario@mariovavti.com> | 2017-07-31 02:24:49 +0200 |
---|---|---|
committer | git-marijus <mario@mariovavti.com> | 2017-07-31 02:24:49 +0200 |
commit | b4efe8ad8d91c70bf869259e6764e7e4a079563b (patch) | |
tree | 791afacf52710049ffc3b37f7ba2d571663d8ecb /Zotlabs/Lib | |
parent | 35c05a318016e3269e4bc677a36b515833fab66e (diff) | |
download | volse-hubzilla-b4efe8ad8d91c70bf869259e6764e7e4a079563b.tar.gz volse-hubzilla-b4efe8ad8d91c70bf869259e6764e7e4a079563b.tar.bz2 volse-hubzilla-b4efe8ad8d91c70bf869259e6764e7e4a079563b.zip |
implement system configs as app requirement and add the pubstream app
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 68587df49..7287bdd52 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -169,6 +169,7 @@ class Apps { $requires = explode(',',$ret['requires']); foreach($requires as $require) { $require = trim(strtolower($require)); + $toggle = (($require[0] == '!') ? 0 : 1); switch($require) { case 'nologin': if(local_channel()) @@ -191,10 +192,12 @@ class Apps { unset($ret); break; default: - if(! (local_channel() && feature_enabled(local_channel(),$require))) + $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true); + $unset = ((get_config('system', ltrim($require, '!')) == $toggle) ? false : true); + + if($unset) unset($ret); break; - } } } @@ -307,6 +310,7 @@ class Apps { $requires = explode(',',$v); foreach($requires as $require) { $require = trim(strtolower($require)); + $toggle = (($require[0] == '!') ? 0 : 1); switch($require) { case 'nologin': if(local_channel()) @@ -330,10 +334,12 @@ class Apps { return ''; break; default: - if(! (local_channel() && feature_enabled(local_channel(),$require))) + $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true); + $unset = ((get_config('system', ltrim($require, '!')) == $toggle) ? false : true); + + if($unset) return ''; break; - } } } |