cvs: pear /MDB2 MDB2.php package.php
| From: | Lukas Smith | Date: | Mon, 02 Jan 2006 15:45:44 +0000 |
| Subject: | cvs: pear /MDB2 MDB2.php package.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-37251@lists.php.net to get a copy of this message | ||
lsmith Mon Jan 2 15:45:44 2006 UTC
Modified files:
/pear/MDB2 MDB2.php package.php
Log:
- explicitly pass if the module is phptype specific in all loadModule calls (bug #6226)
- some clean ups in loadModule()
http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2.php?r1=1.153&r2=1.154&diff_format=u
Index: pear/MDB2/MDB2.php
diff -u pear/MDB2/MDB2.php:1.153 pear/MDB2/MDB2.php:1.154
--- pear/MDB2/MDB2.php:1.153 Thu Dec 29 22:12:23 2005
+++ pear/MDB2/MDB2.php Mon Jan 2 15:45:44 2006
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.153 2005/12/29 22:12:23 lsmith Exp $
+// $Id: MDB2.php,v 1.154 2006/01/02 15:45:44 lsmith Exp $
//
/**
@@ -1548,10 +1548,11 @@
}
if (!isset($this->{$property})) {
+ $version = $phptype_specific;
if ($phptype_specific !== false) {
+ $version = true;
$class_name = 'MDB2_Driver_'.$module.'_'.$this->phptype;
$file_name = str_replace('_', DIRECTORY_SEPARATOR,
$class_name).'.php';
- $version = true;
}
if ($phptype_specific === false
|| (!class_exists($class_name) && !MDB2::fileExists($file_name))
@@ -1559,16 +1560,15 @@
$version = false;
$class_name = 'MDB2_'.$module;
$file_name = str_replace('_', DIRECTORY_SEPARATOR,
$class_name).'.php';
- if (!class_exists($class_name) && !MDB2::fileExists($file_name)) {
- $err =& $this->raiseError(MDB2_ERROR_LOADMODULE, null, null,
- "unable to find module '$module' file
'$file_name'");
- return $err;
- }
}
- if (!class_exists($class_name) && !include_once($file_name)) {
- $err =& $this->raiseError(MDB2_ERROR_LOADMODULE, null, null,
- "unable to load '$module' driver class from file
'$file_name'");
+ if (!class_exists($class_name) && !@include_once($file_name)) {
+ if (!MDB2::fileExists($file_name)) {
+ $msg = "unable to find module '$module' file
'$file_name'";
+ } else {
+ $msg = "unable to load '$module' driver class from file
'$file_name'";
+ }
+ $err =& $this->raiseError(MDB2_ERROR_LOADMODULE, null, null, $msg);
return $err;
}
@@ -1579,7 +1579,7 @@
if ($class_name != $class_name_new) {
$class_name = $class_name_new;
$file_name = str_replace('_', DIRECTORY_SEPARATOR,
$class_name).'.php';
- if (!include_once($file_name)) {
+ if (!@include_once($file_name)) {
if (!MDB2::fileExists($file_name)) {
$msg = "unable to find module '$module' file
'$file_name'";
} else {
@@ -1978,7 +1978,7 @@
$result_wrap_class = false, $limit = null, $offset = null)
{
if ($types === true) {
- $this->loadModule('Reverse');
+ $this->loadModule('Reverse', null, true);
$tableInfo = $this->reverse->tableInfo($result);
if (PEAR::isError($tableInfo)) {
return $tableInfo;
@@ -2113,7 +2113,7 @@
return 'NULL';
}
if ($type) {
- $this->loadModule('Datatype');
+ $this->loadModule('Datatype', null, true);
return $this->datatype->implodeArray($col, $type);
}
return implode(', ', $col);
@@ -2382,7 +2382,7 @@
*/
function quote($value, $type = null, $quote = true)
{
- $result = $this->loadModule('Datatype');
+ $result = $this->loadModule('Datatype', null, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -2405,7 +2405,7 @@
*/
function getDeclaration($type, $name, $field)
{
- $result = $this->loadModule('Datatype');
+ $result = $this->loadModule('Datatype', null, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -2425,7 +2425,7 @@
*/
function compareDefinition($current, $previous)
{
- $result = $this->loadModule('Datatype');
+ $result = $this->loadModule('Datatype', null, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -2720,7 +2720,7 @@
*/
function setResultTypes($types)
{
- $load = $this->db->loadModule('Datatype');
+ $load = $this->db->loadModule('Datatype', null, true);
if (PEAR::isError($load)) {
return $load;
}
http://cvs.php.net/viewcvs.cgi/pear/MDB2/package.php?r1=1.129&r2=1.130&diff_format=u
Index: pear/MDB2/package.php
diff -u pear/MDB2/package.php:1.129 pear/MDB2/package.php:1.130
--- pear/MDB2/package.php:1.129 Fri Dec 30 11:07:30 2005
+++ pear/MDB2/package.php Mon Jan 2 15:45:44 2006
@@ -2,17 +2,10 @@
require_once 'PEAR/PackageFileManager.php';
-$version = '2.0.0RC3';
+$version = '2.0.0RC4';
$notes = <<<EOT
-- added error handling when result set introspection is not supported in _wrapResult()
-- fixed example
-- removed peardb wrapper (its broken, unmaintained and probably unused)
-- added new example using php5 only features
-- MDB2_OK is now a boolean true, instead of integer 1
-- types can now always be keyed by name or by order
-- renamed setResultTypes() in the datatype module to checkResultTypes()
- and modified the signature accordingly
-- removed no longer used MDB2::isManip()
+- explicitly pass if the module is phptype specific in all loadModule calls (bug #6226)
+- some clean ups in loadModule()
EOT;
$description =<<<EOT