cvs: pear /MDB MDB.php
| From: | Lukas Smith | Date: | Wed, 10 Jul 2002 10:53:53 +0000 |
| Subject: | cvs: pear /MDB MDB.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5006@lists.php.net to get a copy of this message | ||
lsmith Wed Jul 10 06:53:53 2002 EDT
Modified files:
/pear/MDB MDB.php
Log:
removed MDB_Warning
options are now stored similar to PEAR DB in an array and not in seperate class vars
Index: pear/MDB/MDB.php
diff -u pear/MDB/MDB.php:1.18 pear/MDB/MDB.php:1.19
--- pear/MDB/MDB.php:1.18 Thu Jul 4 15:07:59 2002
+++ pear/MDB/MDB.php Wed Jul 10 06:53:53 2002
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@dybnet.de> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB.php,v 1.18 2002/07/04 19:07:59 lsmith Exp $
+// $Id: MDB.php,v 1.19 2002/07/10 10:53:53 lsmith Exp $
//
// Database independent query interface.
//
@@ -400,26 +400,9 @@
if (isset($dsninfo["password"])) {
$db->password = $dsninfo["password"];
}
- if (isset($options["persistent"])) {
- $db->persistent = $options["persistent"];
+ if (is_array($options)) {
+ $db->options = array_merge($db->options, $options);
}
- 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"])) {
- $db->log_line_break = $options["loglinebreak"];
- }
- if (isset($options["options"])) {
- $db->options = $options["options"];
- }
-
if(isset($dsninfo["database"])) {
$db->setDatabase($dsninfo["database"]);
$err = $db->connect();
@@ -754,34 +737,4 @@
}
}
}
-
-/**
- * MDB_Warning implements a class for reporting portable database
- * warning messages.
- *
- * @package MDB
- * @author Stig Bakken <ssb@fast.no>
- */
-class MDB_Warning extends PEAR_Error
-{
- /**
- * DB_Warning constructor.
- *
- * @param mixed $code DB error code, or string with error message.
- * @param integer $mode what "error mode" to operate in
- * @param integer $level what error level to use for
- * $mode == PEAR_ERROR_TRIGGER
- * @param mmixed $debuginfo additional debug info, such as the last query
- *
- */
- function MDB_Warning($code = MDB_WARNING, $mode = PEAR_ERROR_RETURN,
- $level = E_USER_NOTICE, $debuginfo = NULL)
- {
- if (is_int($code)) {
- $this->PEAR_Error('DB Warning: ' . MDB::errorMessage($code), $code, $mode,
$level, $debuginfo);
- } else {
- $this->PEAR_Error("DB Warning: $code", 0, $mode, $level, $debuginfo);
- }
- }
-}
-?>
+?>
\ No newline at end of file