From: Jan Schneider Date: Thu, 18 Mar 2010 16:09:47 +0000 (+0100) Subject: Give users a chance to update their old PEAR Log based configurations. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d7015b931ca003bfc78af272df621daac75b27cf;p=horde.git Give users a chance to update their old PEAR Log based configurations. --- diff --git a/framework/Core/lib/Horde/Core/Binder/Logger.php b/framework/Core/lib/Horde/Core/Binder/Logger.php index 8bd263471..ebfddd87b 100644 --- a/framework/Core/lib/Horde/Core/Binder/Logger.php +++ b/framework/Core/lib/Horde/Core/Binder/Logger.php @@ -28,6 +28,9 @@ class Horde_Core_Binder_Logger implements Horde_Injector_Binder break; } + if (!is_string($conf['log']['priority'])) { + $conf['log']['priority'] = 'NOTICE'; + } $handler->addFilter(constant('Horde_Log::' . $conf['log']['priority'])); } diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 0435fcdf9..06eca4bf8 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -285,6 +285,9 @@ class Horde_Registry * 'horde', registry is not used in the method so we are free to * call it here (prevents us from duplicating a bunch of code * here. */ + /* Load Log.php so we can update Horde 3 configurations which still + * use the PEAR_LOG_* contants. */ + @include_once 'Log.php'; $this->_cache['conf-horde'] = Horde::loadConfiguration('conf.php', 'conf', 'horde'); $conf = $GLOBALS['conf'] = &$this->_cache['conf-horde'];