$output = ob_get_clean();
if (!empty($output) && !$show_output) {
- throw new Horde_Exception(sprintf('Failed to import configuration file "%s": ', $file) . strip_tags($output));
+ /* Horde 3 -> 4 conversion checking. This is the only place
+ * to catch PEAR_LOG errors. */
+ if (isset($conf['log']['priority']) &&
+ (strpos($conf['log'], 'PEAR_LOG_') !== false)) {
+ $conf['log']['priority'] = 'INFO';
+ self::logMessage('Logging priority is using the old PEAR_LOG constant', 'INFO');
+ } else {
+ throw new Horde_Exception(sprintf('Failed to import configuration file "%s": ', $file) . strip_tags($output));
+ }
}
if (!$success) {
* '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'];