Jelajahi Sumber

Fix configuration local cache (#3431)

Before, setting values did not refresh the configuration cache. Thus
generating some weird behavior when configuring extensions.
Now, the cache is updated with the most recent values when the
configuration is modified.
Alexis Degrugillier 5 tahun lalu
induk
melakukan
54f04e1233
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      lib/Minz/Extension.php

+ 4 - 0
lib/Minz/Extension.php

@@ -265,6 +265,8 @@ abstract class Minz_Extension {
 
 
 		FreshRSS_Context::$user_conf->{$this->config_key} = $extensions;
 		FreshRSS_Context::$user_conf->{$this->config_key} = $extensions;
 		FreshRSS_Context::$user_conf->save();
 		FreshRSS_Context::$user_conf->save();
+
+		$this->user_configuration = $configuration;
 	}
 	}
 
 
 	public function removeUserConfiguration(){
 	public function removeUserConfiguration(){
@@ -283,5 +285,7 @@ abstract class Minz_Extension {
 
 
 		FreshRSS_Context::$user_conf->{$this->config_key} = $extensions;
 		FreshRSS_Context::$user_conf->{$this->config_key} = $extensions;
 		FreshRSS_Context::$user_conf->save();
 		FreshRSS_Context::$user_conf->save();
+
+		$this->user_configuration = null;
 	}
 	}
 }
 }