cvs: pear /MDB2 MDB2.php /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php mysqli.php
| From: | Lukas Smith | Date: | Tue, 22 Feb 2005 09:51:20 +0000 |
| Subject: | cvs: pear /MDB2 MDB2.php /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php mysqli.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-29663@lists.php.net to get a copy of this message | ||
lsmith Tue Feb 22 04:51:20 2005 EDT
Modified files:
/pear/MDB2 MDB2.php
/pear/MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php
mysqli.php
Log:
- dont force the module name to ucfirst() in loadModule()
http://cvs.php.net/diff.php/pear/MDB2/MDB2.php?r1=1.80&r2=1.81&ty=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.80 pear/MDB2/MDB2.php:1.81 --- pear/MDB2/MDB2.php:1.80 Tue Feb 22 04:36:38 2005 +++ pear/MDB2/MDB2.php Tue Feb 22 04:51:18 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.80 2005/02/22 09:36:38 lsmith Exp $ +// $Id: MDB2.php,v 1.81 2005/02/22 09:51:18 lsmith Exp $ // /** @@ -1439,17 +1439,16 @@ */ function &loadModule($module, $property = null) { - $module = strtolower($module); if (!$property) { - $property = $module; + $property = strtolower($module); } if (!isset($this->{$property})) { $version = false; - $class_name = 'MDB2_'.ucfirst($module); + $class_name = 'MDB2_'.$module; $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; if (!class_exists($class_name) && !MDB2::fileExists($file_name)) { - $class_name = 'MDB2_Driver_'.ucfirst($module).'_'.$this->phptype; + $class_name = 'MDB2_Driver_'.$module.'_'.$this->phptype; $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; $version = true; if (!class_exists($class_name) && !MDB2::fileExists($file_name)) { @@ -2115,7 +2114,7 @@ */ function quote($value, $type = null) { - $result = $this->loadModule('datatype'); + $result = $this->loadModule('Datatype'); if (MDB2::isError($result)) { return $result; } @@ -2138,7 +2137,7 @@ */ function getDeclaration($type, $name, $field) { - $result = $this->loadModule('datatype'); + $result = $this->loadModule('Datatype'); if (MDB2::isError($result)) { return $result; } @@ -2439,7 +2438,7 @@ */ function setResultTypes($types) { - $load = $this->db->loadModule('datatype'); + $load = $this->db->loadModule('Datatype'); if (MDB2::isError($load)) { return $load; } @@ -2764,7 +2763,7 @@ $this->query = $query; $this->types = $types; $this->result_types = $result_types; - $this->db->loadModule('datatype'); + $this->db->loadModule('Datatype'); } function MDB2_Statement_Common(&$db, &$statement, $query, $types, $result_types) http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.49&r2=1.50&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.49 pear/MDB2/MDB2/Driver/fbsql.php:1.50 --- pear/MDB2/MDB2/Driver/fbsql.php:1.49 Fri Jan 14 17:17:17 2005 +++ pear/MDB2/MDB2/Driver/fbsql.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.49 2005/01/14 22:17:17 danielc Exp $ +// $Id: fbsql.php,v 1.50 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -392,7 +392,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -431,7 +431,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID(); } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.75&r2=1.76&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.75 pear/MDB2/MDB2/Driver/ibase.php:1.76 --- pear/MDB2/MDB2/Driver/ibase.php:1.75 Thu Feb 10 10:31:55 2005 +++ pear/MDB2/MDB2/Driver/ibase.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.75 2005/02/10 15:31:55 quipo Exp $ +// $Id: ibase.php,v 1.76 2005/02/22 09:51:19 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -561,7 +561,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.55&r2=1.56&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.55 pear/MDB2/MDB2/Driver/mssql.php:1.56 --- pear/MDB2/MDB2/Driver/mssql.php:1.55 Wed Jan 12 14:55:24 2005 +++ pear/MDB2/MDB2/Driver/mssql.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.55 2005/01/12 19:55:24 lsmith Exp $ +// $Id: mssql.php,v 1.56 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -411,7 +411,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -450,7 +450,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID($table); } } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.51&r2=1.52&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.51 pear/MDB2/MDB2/Driver/mysql.php:1.52 --- pear/MDB2/MDB2/Driver/mysql.php:1.51 Wed Jan 12 14:55:24 2005 +++ pear/MDB2/MDB2/Driver/mysql.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.51 2005/01/12 19:55:24 lsmith Exp $ +// $Id: mysql.php,v 1.52 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -496,7 +496,7 @@ return 'NULL'; } if ($type) { - $this->loadModule('datatype'); + $this->loadModule('Datatype'); return $this->datatype->implodeArray($col, $type); } return implode(', ', $col); @@ -628,7 +628,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -667,7 +667,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID(); } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysqli.php?r1=1.8&r2=1.9&ty=u Index: pear/MDB2/MDB2/Driver/mysqli.php diff -u pear/MDB2/MDB2/Driver/mysqli.php:1.8 pear/MDB2/MDB2/Driver/mysqli.php:1.9 --- pear/MDB2/MDB2/Driver/mysqli.php:1.8 Sun Jan 16 09:03:12 2005 +++ pear/MDB2/MDB2/Driver/mysqli.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.8 2005/01/16 14:03:12 lsmith Exp $ +// $Id: mysqli.php,v 1.9 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -499,7 +499,7 @@ return 'NULL'; } if ($type) { - $this->loadModule('datatype'); + $this->loadModule('Datatype'); return $this->datatype->implodeArray($col, $type); } return implode(', ', $col); @@ -631,7 +631,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -670,7 +670,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID(); }
http://cvs.php.net/diff.php/pear/MDB2/MDB2.php?r1=1.80&r2=1.81&ty=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.80 pear/MDB2/MDB2.php:1.81 --- pear/MDB2/MDB2.php:1.80 Tue Feb 22 04:36:38 2005 +++ pear/MDB2/MDB2.php Tue Feb 22 04:51:18 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.80 2005/02/22 09:36:38 lsmith Exp $ +// $Id: MDB2.php,v 1.81 2005/02/22 09:51:18 lsmith Exp $ // /** @@ -1439,17 +1439,16 @@ */ function &loadModule($module, $property = null) { - $module = strtolower($module); if (!$property) { - $property = $module; + $property = strtolower($module); } if (!isset($this->{$property})) { $version = false; - $class_name = 'MDB2_'.ucfirst($module); + $class_name = 'MDB2_'.$module; $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; if (!class_exists($class_name) && !MDB2::fileExists($file_name)) { - $class_name = 'MDB2_Driver_'.ucfirst($module).'_'.$this->phptype; + $class_name = 'MDB2_Driver_'.$module.'_'.$this->phptype; $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; $version = true; if (!class_exists($class_name) && !MDB2::fileExists($file_name)) { @@ -2115,7 +2114,7 @@ */ function quote($value, $type = null) { - $result = $this->loadModule('datatype'); + $result = $this->loadModule('Datatype'); if (MDB2::isError($result)) { return $result; } @@ -2138,7 +2137,7 @@ */ function getDeclaration($type, $name, $field) { - $result = $this->loadModule('datatype'); + $result = $this->loadModule('Datatype'); if (MDB2::isError($result)) { return $result; } @@ -2439,7 +2438,7 @@ */ function setResultTypes($types) { - $load = $this->db->loadModule('datatype'); + $load = $this->db->loadModule('Datatype'); if (MDB2::isError($load)) { return $load; } @@ -2764,7 +2763,7 @@ $this->query = $query; $this->types = $types; $this->result_types = $result_types; - $this->db->loadModule('datatype'); + $this->db->loadModule('Datatype'); } function MDB2_Statement_Common(&$db, &$statement, $query, $types, $result_types) http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.49&r2=1.50&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.49 pear/MDB2/MDB2/Driver/fbsql.php:1.50 --- pear/MDB2/MDB2/Driver/fbsql.php:1.49 Fri Jan 14 17:17:17 2005 +++ pear/MDB2/MDB2/Driver/fbsql.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.49 2005/01/14 22:17:17 danielc Exp $ +// $Id: fbsql.php,v 1.50 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -392,7 +392,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -431,7 +431,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID(); } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.75&r2=1.76&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.75 pear/MDB2/MDB2/Driver/ibase.php:1.76 --- pear/MDB2/MDB2/Driver/ibase.php:1.75 Thu Feb 10 10:31:55 2005 +++ pear/MDB2/MDB2/Driver/ibase.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.75 2005/02/10 15:31:55 quipo Exp $ +// $Id: ibase.php,v 1.76 2005/02/22 09:51:19 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -561,7 +561,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.55&r2=1.56&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.55 pear/MDB2/MDB2/Driver/mssql.php:1.56 --- pear/MDB2/MDB2/Driver/mssql.php:1.55 Wed Jan 12 14:55:24 2005 +++ pear/MDB2/MDB2/Driver/mssql.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.55 2005/01/12 19:55:24 lsmith Exp $ +// $Id: mssql.php,v 1.56 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -411,7 +411,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -450,7 +450,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID($table); } } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.51&r2=1.52&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.51 pear/MDB2/MDB2/Driver/mysql.php:1.52 --- pear/MDB2/MDB2/Driver/mysql.php:1.51 Wed Jan 12 14:55:24 2005 +++ pear/MDB2/MDB2/Driver/mysql.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.51 2005/01/12 19:55:24 lsmith Exp $ +// $Id: mysql.php,v 1.52 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -496,7 +496,7 @@ return 'NULL'; } if ($type) { - $this->loadModule('datatype'); + $this->loadModule('Datatype'); return $this->datatype->implodeArray($col, $type); } return implode(', ', $col); @@ -628,7 +628,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -667,7 +667,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID(); } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysqli.php?r1=1.8&r2=1.9&ty=u Index: pear/MDB2/MDB2/Driver/mysqli.php diff -u pear/MDB2/MDB2/Driver/mysqli.php:1.8 pear/MDB2/MDB2/Driver/mysqli.php:1.9 --- pear/MDB2/MDB2/Driver/mysqli.php:1.8 Sun Jan 16 09:03:12 2005 +++ pear/MDB2/MDB2/Driver/mysqli.php Tue Feb 22 04:51:19 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.8 2005/01/16 14:03:12 lsmith Exp $ +// $Id: mysqli.php,v 1.9 2005/02/22 09:51:19 lsmith Exp $ // /** @@ -499,7 +499,7 @@ return 'NULL'; } if ($type) { - $this->loadModule('datatype'); + $this->loadModule('Datatype'); return $this->datatype->implodeArray($col, $type); } return implode(', ', $col); @@ -631,7 +631,7 @@ $this->popExpect(); if (MDB2::isError($result)) { if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { - $this->loadModule('manager'); + $this->loadModule('Manager'); // Since we are creating the sequence on demand // we know the first id = 1 so initialize the // sequence at 2 @@ -670,7 +670,7 @@ */ function getAfterID($id, $table) { - $this->loadModule('native'); + $this->loadModule('Native'); return $this->native->getInsertID(); }