- Timestamp:
- 09/26/13 15:41:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.5.1-evolucao/phpgwapi/inc/adodb/adodb-pear.inc.php
r34 r8222 1 1 <?php 2 2 /** 3 * @version V 4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.3 * @version V5.18 3 Sep 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. 4 4 * Released under both BSD license and Lesser GPL library license. 5 5 * Whenever there is any discrepancy between the two licenses, … … 110 110 */ 111 111 112 function &factory($type)112 function factory($type) 113 113 { 114 114 include_once(ADODB_DIR."/drivers/adodb-$type.inc.php"); 115 $obj = &NewADOConnection($type);116 if (!is_object($obj)) $obj = &new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);115 $obj = NewADOConnection($type); 116 if (!is_object($obj)) $obj = new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1); 117 117 return $obj; 118 118 } … … 137 137 * @see DB::isError 138 138 */ 139 function &connect($dsn, $options = false)139 function connect($dsn, $options = false) 140 140 { 141 141 if (is_array($dsn)) { … … 158 158 } 159 159 160 @$obj = &NewADOConnection($type);160 @$obj = NewADOConnection($type); 161 161 if (!is_object($obj)) { 162 $obj = &new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);162 $obj = new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1); 163 163 return $obj; 164 164 } … … 212 212 { 213 213 if (!is_object($value)) return false; 214 $class = get_class($value);214 $class = strtolower(get_class($value)); 215 215 return $class == 'pear_error' || is_subclass_of($value, 'pear_error') || 216 216 $class == 'db_error' || is_subclass_of($value, 'db_error');
Note: See TracChangeset
for help on using the changeset viewer.