Default features should now work with the forumwidget again
This commit is contained in:
parent
068d3dc746
commit
6cb637e8ab
1 changed files with 6 additions and 11 deletions
|
@ -16,14 +16,10 @@ use Friendica\Core\PConfig;
|
||||||
function feature_enabled($uid, $feature) {
|
function feature_enabled($uid, $feature) {
|
||||||
$x = Config::get('feature_lock', $feature, false);
|
$x = Config::get('feature_lock', $feature, false);
|
||||||
|
|
||||||
if (!$x) {
|
if ($x === false) {
|
||||||
$x = PConfig::get($uid, 'feature', $feature, false);
|
$x = get_feature_default($feature);
|
||||||
if (!$x) {
|
$x = Config::get('feature', $feature, $x);
|
||||||
$x = Config::get('feature', $feature, false);
|
$x = PConfig::get($uid, 'feature', $feature, $x);
|
||||||
if (!$x) {
|
|
||||||
$x = get_feature_default($feature);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
||||||
|
@ -125,10 +121,9 @@ function get_features($filtered = true) {
|
||||||
$kquantity = count($arr[$k]);
|
$kquantity = count($arr[$k]);
|
||||||
for ($y = 0; $y < $kquantity; $y ++) {
|
for ($y = 0; $y < $kquantity; $y ++) {
|
||||||
if (is_array($arr[$k][$y])) {
|
if (is_array($arr[$k][$y])) {
|
||||||
if (!$arr[$k][$y][4]) {
|
if ($arr[$k][$y][4] === false) {
|
||||||
$has_items = true;
|
$has_items = true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
unset($arr[$k][$y]);
|
unset($arr[$k][$y]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue