cvs: pear /MDB MDB.php

From: Date: Fri, 17 May 2002 19:03:23 +0000
Subject: cvs: pear /MDB MDB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3911@lists.php.net to get a copy of this message
lsmith Fri May 17 15:03:23 2002 EDT Modified files: /pear/MDB MDB.php Log: if no include path is supplied dirname(__FILE__) is used fixed a couple minor typos Index: pear/MDB/MDB.php diff -u pear/MDB/MDB.php:1.7 pear/MDB/MDB.php:1.8 --- pear/MDB/MDB.php:1.7 Fri May 17 13:35:00 2002 +++ pear/MDB/MDB.php Fri May 17 15:03:23 2002 @@ -1,7 +1,7 @@ <?php /* * - * @(#) $Header: /usr/repository/pear/MDB/MDB.php,v 1.7 2002/05/17 17:35:00 lsmith Exp $ + * @(#) $Header: /usr/repository/pear/MDB/MDB.php,v 1.8 2002/05/17 19:03:23 lsmith Exp $ * */ @@ -49,7 +49,7 @@ * MDB::isWarning(). */ -define('MDB_Warning', -1000); +define('DB_WARNING', -1000); define('DB_WARNING_READ_ONLY', -1001); /* @@ -279,19 +279,16 @@ null, null, 'no existing DBMS driver specified', 'MDB_Error', true); } } - if (!strcmp($included,"") - || !defined($included)) + if (!strcmp($included,"") || !defined($included)) { - $include_path=(isset($options["includepath"]) ? $options["includepath"] : ""); - if ($include_path!="" - && $include_path[strlen($include_path)-1]!="/") - { + $include_path = (isset($options["includepath"]) ? $options["includepath"] : dirname(__FILE__)); + if ($include_path != "" && $include_path[strlen($include_path)-1] != "/") { $include="/".$include; } if (!file_exists($include_path.$include)) { $directory = 0; if (!strcmp($include_path,"") - || ($directory=@opendir($include_path))) + || ($directory = @opendir($include_path))) { if ($directory) { closedir($directory); @@ -372,8 +369,8 @@ function isError($value) { return (is_object($value) && - (get_class($value) == 'MDB_Error' || - is_subclass_of($value, 'MDB_Error'))); + (get_class($value) == 'mdb_error' || + is_subclass_of($value, 'mdb_error'))); } /** @@ -411,8 +408,8 @@ function isWarning($value) { return (is_object($value) && - (get_class($value) == "db_warning" || - is_subclass_of($value, "db_warning"))); + (get_class($value) == "mdb_warning" || + is_subclass_of($value, "mdb_warning"))); } /**

« previous php.pear.cvs (#3911) next »