Give users a chance to update their old PEAR Log based configurations.
authorJan Schneider <jan@horde.org>
Thu, 18 Mar 2010 16:09:47 +0000 (17:09 +0100)
committerJan Schneider <jan@horde.org>
Thu, 18 Mar 2010 16:09:47 +0000 (17:09 +0100)
framework/Core/lib/Horde/Core/Binder/Logger.php
framework/Core/lib/Horde/Registry.php

index 8bd2634..ebfddd8 100644 (file)
@@ -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']));
         }
 
index 0435fcd..06eca4b 100644 (file)
@@ -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'];