Explorar o código

Add a setter for extensions_enabled config value

Marien Fressinaud %!s(int64=11) %!d(string=hai) anos
pai
achega
e86a6097c8
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      app/Models/ConfigurationSetter.php

+ 8 - 0
app/Models/ConfigurationSetter.php

@@ -67,6 +67,14 @@ class FreshRSS_ConfigurationSetter {
 		}
 	}
 
+	// It works for system config too!
+	private function _extensions_enabled(&$data, $value) {
+		if (!is_array($value)) {
+			$value = array($value);
+		}
+		$data['extensions_enabled'] = $value;
+	}
+
 	private function _html5_notif_timeout(&$data, $value) {
 		$value = intval($value);
 		$data['html5_notif_timeout'] = $value >= 0 ? $value : 0;