X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffeatures.php;h=07dcced0e6da630b1142f9112f080a68b8843d19;hb=0cd9db9cb7f4c96f597e37590a536eaae123238d;hp=74c110427ce6c8d87d02c1039bc59407d1960aa9;hpb=4ebebe96fee1ea3dda219fa7049e6d14a142aa19;p=friendica.git diff --git a/include/features.php b/include/features.php index 74c110427c..07dcced0e6 100644 --- a/include/features.php +++ b/include/features.php @@ -36,9 +36,9 @@ function feature_enabled($uid, $feature) { */ function get_feature_default($feature) { $f = get_features(); - foreach($f as $cat) { - foreach($cat as $feat) { - if(is_array($feat) && $feat[0] === $feature) + foreach ($f as $cat) { + foreach ($cat as $feat) { + if (is_array($feat) && $feat[0] === $feature) return $feat[3]; } } @@ -116,13 +116,13 @@ function get_features($filtered = true) { // removed any locked features and remove the entire category if this makes it empty - if($filtered) { - foreach($arr as $k => $x) { + if ($filtered) { + foreach ($arr as $k => $x) { $has_items = false; $kquantity = count($arr[$k]); - for($y = 0; $y < $kquantity; $y ++) { - if(is_array($arr[$k][$y])) { - if($arr[$k][$y][4] === false) { + for ($y = 0; $y < $kquantity; $y ++) { + if (is_array($arr[$k][$y])) { + if ($arr[$k][$y][4] === false) { $has_items = true; } else { @@ -130,7 +130,7 @@ function get_features($filtered = true) { } } } - if(! $has_items) { + if (! $has_items) { unset($arr[$k]); } }