aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-07-31 02:24:49 +0200
committergit-marijus <mario@mariovavti.com>2017-07-31 02:24:49 +0200
commitb4efe8ad8d91c70bf869259e6764e7e4a079563b (patch)
tree791afacf52710049ffc3b37f7ba2d571663d8ecb /Zotlabs/Lib
parent35c05a318016e3269e4bc677a36b515833fab66e (diff)
downloadvolse-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.php14
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;
-
}
}
}