cvs: pear /MDB MDB.php

From: Date: Sat, 20 Jul 2002 19:23:23 +0000
Subject: cvs: pear /MDB MDB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5211@lists.php.net to get a copy of this message
lsmith Sat Jul 20 15:23:23 2002 EDT Modified files: /pear/MDB MDB.php Log: moved more code to the MDB_common constructor Index: pear/MDB/MDB.php diff -u pear/MDB/MDB.php:1.22 pear/MDB/MDB.php:1.23 --- pear/MDB/MDB.php:1.22 Fri Jul 19 10:46:23 2002 +++ pear/MDB/MDB.php Sat Jul 20 15:23:22 2002 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@dybnet.de> | // +----------------------------------------------------------------------+ // -// $Id: MDB.php,v 1.22 2002/07/19 14:46:23 lsmith Exp $ +// $Id: MDB.php,v 1.23 2002/07/20 19:23:22 lsmith Exp $ // // Database independent query interface. // @@ -236,14 +236,7 @@ NULL, NULL, NULL, 'MDB_Error', TRUE); } - @$db =& new $classname; - - global $databases; - $database = count($databases)+1; - $databases[$database] = &$db; - $db->database = $database; - - return $db; + return new $classname; } /** @@ -345,14 +338,7 @@ return PEAR::raiseError(NULL, DB_ERROR_NOT_FOUND, NULL, NULL, NULL, 'MDB_Error', TRUE); } - $db = new $class_name($dsninfo, $options); - - global $databases; - $database = count($databases)+1; - $databases[$database] = &$db; - $db->database = $database; - - return $db; + return new $class_name($dsninfo, $options); } /**

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