]> granicus.if.org Git - php/commitdiff
fix the Log::factory() method to assume that the Log stuff is in the
authorChuck Hagenbuch <chagenbu@php.net>
Thu, 4 Jan 2001 15:56:05 +0000 (15:56 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Thu, 4 Jan 2001 15:56:05 +0000 (15:56 +0000)
include_path (like all of PEAR does).

pear/Log.php

index ac10b226b2e31f2f134ece9abbfdcdc8275d9751..f4c029c002bd1661e1e13af262a1fb295fc82283 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $
 
 /**
@@ -52,9 +53,8 @@ class Log {
      */
     function factory ($log_type, $log_name = '', $ident = '', $conf = array()) {
         $log_type = strtolower($log_type);
-        $classfile = dirname(__FILE__) . '/Log/' . $log_type . '.php';
-        if (@is_readable($classfile)) {
-            include_once $classfile;
+        $classfile = 'Log/' . $log_type . '.php';
+       if (@include_once $classfile) {
             $class = 'Log_' . $log_type;
             return new $class($log_name, $ident, $conf);
         } else {