diff options
author | mrjive <mrjive@mrjive.it> | 2016-01-07 10:47:11 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2016-01-07 10:47:11 +0100 |
commit | 0fa34c6880853e64b88749bcf9cc9b9e8c9a198b (patch) | |
tree | d66f296749a44506c27f852e3efb261f88adb187 /include/features.php | |
parent | dcb5f624137f43e382e529d1484f2b66a85a088c (diff) | |
parent | 761afd029d97703f2f7609d546b7b5f3d257c601 (diff) | |
download | volse-hubzilla-0fa34c6880853e64b88749bcf9cc9b9e8c9a198b.tar.gz volse-hubzilla-0fa34c6880853e64b88749bcf9cc9b9e8c9a198b.tar.bz2 volse-hubzilla-0fa34c6880853e64b88749bcf9cc9b9e8c9a198b.zip |
Merge pull request #12 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/features.php')
-rw-r--r-- | include/features.php | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/include/features.php b/include/features.php index b02d912cf..3cbbf5b7d 100644 --- a/include/features.php +++ b/include/features.php @@ -36,7 +36,7 @@ function get_feature_default($feature) { } -function get_features() { +function get_features($filtered = true) { $arr = array( @@ -98,20 +98,22 @@ function get_features() { // removed any locked features and remove the entire category if this makes it empty - foreach($arr as $k => $x) { - $has_items = false; - for($y = 0; $y < count($arr[$k]); $y ++) { - if(is_array($arr[$k][$y])) { - if($arr[$k][$y][4] === false) { - $has_items = true; - } - else { - unset($arr[$k][$y]); + if($filtered) { + foreach($arr as $k => $x) { + $has_items = false; + for($y = 0; $y < count($arr[$k]); $y ++) { + if(is_array($arr[$k][$y])) { + if($arr[$k][$y][4] === false) { + $has_items = true; + } + else { + unset($arr[$k][$y]); + } } } - } - if(! $has_items) { - unset($arr[$k]); + if(! $has_items) { + unset($arr[$k]); + } } } |