Good looking and better performance
This commit is contained in:
parent
774a7193d2
commit
e4995dbad5
|
@ -16,10 +16,14 @@ 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 === false) {
|
||||||
|
$x = PConfig::get($uid, 'feature', $feature, false);
|
||||||
|
}
|
||||||
|
if ($x === false) {
|
||||||
|
$x = Config::get('feature', $feature, false);
|
||||||
|
}
|
||||||
if ($x === false) {
|
if ($x === false) {
|
||||||
$x = get_feature_default($feature);
|
$x = get_feature_default($feature);
|
||||||
$x = Config::get('feature', $feature, $x);
|
|
||||||
$x = PConfig::get($uid, 'feature', $feature, $x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
||||||
|
|
Loading…
Reference in a new issue