Improve performance of settings save by not querying the DB if submitted value is the same
This commit is contained in:
@@ -126,6 +126,10 @@ class Config {
|
||||
public static function set($family, $key, $value) {
|
||||
global $a;
|
||||
|
||||
if (self::get($family, $key) === $value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$a->config[$family][$key] = $value;
|
||||
|
||||
// manage array value
|
||||
|
||||
Reference in New Issue
Block a user