cvs: pear /MDB MDB.php
| From: | Lukas Smith | Date: | Wed, 05 Jun 2002 14:15:32 +0000 |
| Subject: | cvs: pear /MDB MDB.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4423@lists.php.net to get a copy of this message | ||
lsmith Wed Jun 5 10:15:32 2002 EDT
Modified files:
/pear/MDB MDB.php
Log:
removed the need the need for a call to $db->setup() by moving the code into the class
constructor
added autofree option
Index: pear/MDB/MDB.php
diff -u pear/MDB/MDB.php:1.12 pear/MDB/MDB.php:1.13
--- pear/MDB/MDB.php:1.12 Fri May 31 13:27:21 2002
+++ pear/MDB/MDB.php Wed Jun 5 10:15:32 2002
@@ -16,7 +16,7 @@
// | Author: Lukas Smith <smith@dybnet.de> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB.php,v 1.12 2002/05/31 17:27:21 lsmith Exp $
+// $Id: MDB.php,v 1.13 2002/06/05 14:15:32 lsmith Exp $
//
// Database independent query interface.
//
@@ -336,10 +336,7 @@
null, null, null, 'MDB_Error', true);
}
$db = new $class_name;
- $db->include_path=$include_path;
- if (isset($dsninfo["phptype"])) {
- $db->phptype = $dsninfo["phptype"];
- }
+ $db->include_path = $include_path;
if (isset($dsninfo["hostspec"])) {
$db->host = $dsninfo["hostspec"];
}
@@ -355,6 +352,9 @@
if (isset($options["debug"])) {
$db->debug = $options["debug"];
}
+ if (isset($options["autofree"])) {
+ $db->autofree = $options["autofree"];
+ }
$db->decimal_places = (isset($options["decimalplaces"]) ?
$options["decimalplaces"] : 2);
$db->lob_buffer_length = (isset($options["LOBbufferlength"]) ?
$options["LOBbufferlength"] : 8000);
if (isset($options["loglinebreak"])) {
@@ -363,7 +363,7 @@
if (isset($options["options"])) {
$db->options = $options["options"];
}
- $db->setup();
+
if(isset($dsninfo["database"])) {
$db->setDatabase($dsninfo["database"]);
$err = $db->connect();