From e4995dbad569673b7e4c5bbbb06b1c34f9bae063 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 13:12:54 +0000 Subject: [PATCH] Good looking and better performance --- include/features.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/features.php b/include/features.php index f2a81fc6ec..4e9e7d9d95 100644 --- a/include/features.php +++ b/include/features.php @@ -16,10 +16,14 @@ use Friendica\Core\PConfig; function feature_enabled($uid, $feature) { $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) { $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);