cvs: php4 /pear Log.php

From: Date: Thu, 04 Jan 2001 15:56:06 +0000
Subject: cvs: php4 /pear Log.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3366@lists.php.net to get a copy of this message
chagenbu Thu Jan 4 07:56:06 2001 EDT Modified files: /php4/pear Log.php Log: fix the Log::factory() method to assume that the Log stuff is in the include_path (like all of PEAR does). Index: php4/pear/Log.php diff -u php4/pear/Log.php:1.1 php4/pear/Log.php:1.2 --- php4/pear/Log.php:1.1 Wed Dec 6 17:06:58 2000 +++ php4/pear/Log.php Thu Jan 4 07:56:05 2001 @@ -1,4 +1,5 @@ <?php +// $Id: Log.php,v 1.2 2001/01/04 15:56:05 chagenbu Exp $ // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ /** @@ -7,7 +8,7 @@ * * @author Chuck Hagenbuch <chuck@horde.org> * @author Jon Parise <jon@csh.rit.edu> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 */ class Log { @@ -52,9 +53,8 @@ */ 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 {

« previous php.cvs (#3366) next »