소스 검색

Quick fix cron actualization due to problematic FreshRSS constructor/init

https://github.com/FreshRSS/FreshRSS/issues/759
Suggestion: the static objects should be user-independent (or at least
with the possibility to be re-set), while the FreshRSS object and its
attributes should be user-dependent.
Alexandre Alapetite 11 년 전
부모
커밋
12081f7ba2
2개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 1
      app/actualize_script.php
  2. 0 7
      lib/Minz/Configuration.php

+ 2 - 1
app/actualize_script.php

@@ -22,7 +22,6 @@ $_SERVER['HTTP_HOST'] = '';
 
 
 $app = new FreshRSS();
-$app->init();
 
 $system_conf = Minz_Configuration::get('system');
 $system_conf->auth_type = 'none';  // avoid necessity to be logged in (not saved!)
@@ -56,7 +55,9 @@ foreach ($users as $user) {
 
 
 	Minz_Session::_param('currentUser', $user);
+	new Minz_ModelPdo($user);	//TODO: FIXME: Quick-fix while waiting for a better FreshRSS() constructor/init
 	FreshRSS_Auth::giveAccess();
+	$app->init();
 	$app->run();
 
 

+ 0 - 7
lib/Minz/Configuration.php

@@ -16,16 +16,9 @@ class Minz_Configuration {
 	 * @param $config_filename the filename of the configuration
 	 * @param $default_filename a filename containing default values for the configuration
 	 * @param $configuration_setter an optional helper to set values in configuration
-	 * @throws Minz_ConfigurationNamespaceException if the namespace already exists.
 	 */
 	public static function register($namespace, $config_filename, $default_filename = null,
 	                                $configuration_setter = null) {
-		if (isset(self::$config_list[$namespace])) {
-			throw new Minz_ConfigurationNamespaceException(
-				$namespace . ' namespace already exists'
-			);
-		}
-
 		self::$config_list[$namespace] = new Minz_Configuration(
 			$namespace, $config_filename, $default_filename, $configuration_setter
 		);