fix clearstorage at start
This commit is contained in:
parent
8b3e624d1c
commit
4bcbda64d6
@ -125,7 +125,8 @@ class SettingManager implements CallbackListener, UsageInformationAble {
|
|||||||
* Handle After Init Callback
|
* Handle After Init Callback
|
||||||
*/
|
*/
|
||||||
public function handleAfterInit() {
|
public function handleAfterInit() {
|
||||||
$this->disableCache = $this->getSettingValue($this, self::SETTING_DISABLE_SETTING_CACHE);
|
$this->disableCache = boolval($this->getSettingValue($this, self::SETTING_DISABLE_SETTING_CACHE));
|
||||||
|
if ($this->disableCache) $this->clearStorage();
|
||||||
$this->deleteUnusedSettings();
|
$this->deleteUnusedSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,12 +440,13 @@ class SettingManager implements CallbackListener, UsageInformationAble {
|
|||||||
// Trigger Settings Changed Callback
|
// Trigger Settings Changed Callback
|
||||||
if (!$init) {
|
if (!$init) {
|
||||||
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_SETTING_CHANGED, $setting);
|
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_SETTING_CHANGED, $setting);
|
||||||
}
|
|
||||||
|
|
||||||
if ($setting->setting === self::SETTING_DISABLE_SETTING_CACHE) {
|
// during the init, value = default
|
||||||
$this->disableCache = $setting->value;
|
if ($setting->setting === self::SETTING_DISABLE_SETTING_CACHE) {
|
||||||
if ($this->disableCache) {
|
$this->disableCache = boolval($setting->value);
|
||||||
$this->clearStorage();
|
if ($this->disableCache) {
|
||||||
|
$this->clearStorage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user