- Timestamp:
- 2013/08/02 13:22:57 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/module/MDB2/Driver/Reverse/Common.php
r20764 r23022 43 43 // +----------------------------------------------------------------------+ 44 44 // 45 // $Id: Common.php ,v 1.43 2009/01/14 15:01:21 quipo Exp$45 // $Id: Common.php 327310 2012-08-27 15:16:18Z danielc $ 46 46 // 47 47 … … 108 108 function getTableFieldDefinition($table, $field) 109 109 { 110 $db = &$this->getDBInstance();111 if ( PEAR::isError($db)) {110 $db = $this->getDBInstance(); 111 if (MDB2::isError($db)) { 112 112 return $db; 113 113 } … … 142 142 function getTableIndexDefinition($table, $index) 143 143 { 144 $db = &$this->getDBInstance();145 if ( PEAR::isError($db)) {144 $db = $this->getDBInstance(); 145 if (MDB2::isError($db)) { 146 146 return $db; 147 147 } … … 194 194 function getTableConstraintDefinition($table, $index) 195 195 { 196 $db = &$this->getDBInstance();197 if ( PEAR::isError($db)) {196 $db = $this->getDBInstance(); 197 if (MDB2::isError($db)) { 198 198 return $db; 199 199 } … … 221 221 function getSequenceDefinition($sequence) 222 222 { 223 $db = &$this->getDBInstance();224 if ( PEAR::isError($db)) {223 $db = $this->getDBInstance(); 224 if (MDB2::isError($db)) { 225 225 return $db; 226 226 } 227 227 228 228 $start = $db->currId($sequence); 229 if ( PEAR::isError($start)) {229 if (MDB2::isError($start)) { 230 230 return $start; 231 231 } … … 274 274 function getTriggerDefinition($trigger) 275 275 { 276 $db = &$this->getDBInstance();277 if ( PEAR::isError($db)) {276 $db = $this->getDBInstance(); 277 if (MDB2::isError($db)) { 278 278 return $db; 279 279 } … … 408 408 function tableInfo($result, $mode = null) 409 409 { 410 $db = &$this->getDBInstance();411 if ( PEAR::isError($db)) {410 $db = $this->getDBInstance(); 411 if (MDB2::isError($db)) { 412 412 return $db; 413 413 } … … 420 420 $db->loadModule('Manager', null, true); 421 421 $fields = $db->manager->listTableFields($result); 422 if ( PEAR::isError($fields)) {422 if (MDB2::isError($fields)) { 423 423 return $fields; 424 424 } … … 430 430 431 431 $indexes = $db->manager->listTableIndexes($result); 432 if ( PEAR::isError($indexes)) {432 if (MDB2::isError($indexes)) { 433 433 $db->setOption('idxname_format', $idxname_format); 434 434 return $indexes; … … 437 437 foreach ($indexes as $index) { 438 438 $definition = $this->getTableIndexDefinition($result, $index); 439 if ( PEAR::isError($definition)) {439 if (MDB2::isError($definition)) { 440 440 $db->setOption('idxname_format', $idxname_format); 441 441 return $definition; … … 449 449 450 450 $constraints = $db->manager->listTableConstraints($result); 451 if ( PEAR::isError($constraints)) {451 if (MDB2::isError($constraints)) { 452 452 return $constraints; 453 453 } … … 455 455 foreach ($constraints as $constraint) { 456 456 $definition = $this->getTableConstraintDefinition($result, $constraint); 457 if ( PEAR::isError($definition)) {457 if (MDB2::isError($definition)) { 458 458 $db->setOption('idxname_format', $idxname_format); 459 459 return $definition; … … 479 479 foreach ($fields as $i => $field) { 480 480 $definition = $this->getTableFieldDefinition($result, $field); 481 if ( PEAR::isError($definition)) {481 if (MDB2::isError($definition)) { 482 482 $db->setOption('idxname_format', $idxname_format); 483 483 return $definition;
Note: See TracChangeset
for help on using the changeset viewer.