Procházet zdrojové kódy

Changement sauvegarde configuration

Changement oublié dans
https://github.com/marienfressinaud/FreshRSS/commit/66229a5d71b85c0a57d63fa8b1cc6e5729cabfe4
pour https://github.com/marienfressinaud/FreshRSS/issues/126
Alexandre Alapetite před 12 roky
rodič
revize
bc4116ea77
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      app/Models/Configuration.php

+ 2 - 1
app/Models/Configuration.php

@@ -79,7 +79,8 @@ class FreshRSS_Configuration {
 	}
 
 	public function save() {
-		if (file_put_contents($this->filename, "<?php\n return " . var_export($array, true) . ';', LOCK_EX) === false) {
+		@rename($this->filename, $this->filename . '.bak');
+		if (file_put_contents($this->filename, "<?php\n return " . var_export($this->data, true) . ';', LOCK_EX) === false) {
 			throw new Minz_PermissionDeniedException($this->filename);
 		}
 		if (function_exists('opcache_invalidate')) {