cvs: pear /MDB/MDB Date.php Manager.php Parser.php reverse_engineer_xml_schema.php /MDB/MDB/Modules LOB.php /MDB/MDB/Modules/Manager Common.php

From: Date: Sun, 19 Jan 2003 11:13:37 +0000
Subject: cvs: pear /MDB/MDB Date.php Manager.php Parser.php reverse_engineer_xml_schema.php /MDB/MDB/Modules LOB.php /MDB/MDB/Modules/Manager Common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8406@lists.php.net to get a copy of this message
lsmith Sun Jan 19 06:13:37 2003 EDT Modified files: /pear/MDB/MDB reverse_engineer_xml_schema.php Parser.php Manager.php Date.php /pear/MDB/MDB/Modules LOB.php /pear/MDB/MDB/Modules/Manager Common.php Log: - cs fixes

Index: pear/MDB/MDB/reverse_engineer_xml_schema.php diff -u pear/MDB/MDB/reverse_engineer_xml_schema.php:1.15 pear/MDB/MDB/reverse_engineer_xml_schema.php:1.16 --- pear/MDB/MDB/reverse_engineer_xml_schema.php:1.15 Mon Nov 25 19:07:33 2002 +++ pear/MDB/MDB/reverse_engineer_xml_schema.php Sun Jan 19 06:13:35 2003 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: reverse_engineer_xml_schema.php,v 1.15 2002/11/26 00:07:33 lsmith Exp $ +// $Id: reverse_engineer_xml_schema.php,v 1.16 2003/01/19 11:13:35 lsmith Exp $ // /** @@ -68,8 +68,8 @@ } } ini_set('include_path', '..'.PATH_SEPARATOR.ini_get('include_path')); - require_once 'MDB.php'; - require_once 'Var_Dump.php'; + require_once('MDB.php'); + require_once('Var_Dump.php'); MDB::loadFile('Manager'); $dsn = $_REQUEST['type'].'://'.$_REQUEST['user'].':'.$_REQUEST['pass'].'@'.$_REQUEST['host'].'/'.$_REQUEST['name']; @@ -109,14 +109,14 @@ } $warnings = $manager->getWarnings(); if(count($warnings) > 0) { - echo 'Warnings<br>'; + echo('Warnings<br>'); Var_Dump::display($warnings); } if($manager->options['debug']) { - echo 'Debug messages<br>'; - echo $manager->debugOutput().'<br>'; + echo('Debug messages<br>'); + echo($manager->debugOutput().'<br>'); } - echo 'Database structure<br>'; + echo('Database structure<br>'); Var_Dump::display($manager->database_definition); $manager->disconnect(); } @@ -124,7 +124,7 @@ if (!isset($_REQUEST['submit']) || isset($error)) { if (isset($error) && $error) { - echo $error.'<br>'; + echo($error.'<br>'); } echo (' <form action="reverse_engineer_xml_schema.php"> Index: pear/MDB/MDB/Parser.php diff -u pear/MDB/MDB/Parser.php:1.28 pear/MDB/MDB/Parser.php:1.29 --- pear/MDB/MDB/Parser.php:1.28 Mon Jan 13 09:26:23 2003 +++ pear/MDB/MDB/Parser.php Sun Jan 19 06:13:35 2003 @@ -42,10 +42,10 @@ // | Author: Christian Dickmann <dickmann@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Parser.php,v 1.28 2003/01/13 14:26:23 lsmith Exp $ +// $Id: Parser.php,v 1.29 2003/01/19 11:13:35 lsmith Exp $ // -require_once 'XML/Parser.php'; +require_once('XML/Parser.php'); /** * Parses an XML schema file @@ -362,58 +362,58 @@ case 'text': case 'clob': if (isset($field_def['length']) && strlen($field_value) > $field_def['length']) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); }; break; case 'blob': /* if (!preg_match('/^([0-9a-f]{2})*$/i', $field_value)) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); } */ $field_value = pack('H*', $field_value); if (isset($field_def['length']) && strlen($field_value) > $field_def['length']) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); }; break; case 'integer': if ($field_value != ((int)$field_value)) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); }; $field_value = (int) $field_value; if (isset($field_def['unsigned']) && $field_def['unsigned'] && $field_value < 0) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); }; break; case 'boolean': if (!$this->is_boolean($field_value)) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); } break; case 'date': if (!preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/', $field_value)) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); } break; case 'timestamp': if (!preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/', $field_value)) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); } break; case 'time': if (!preg_match("/([0-9]{2}):([0-9]{2}):([0-9]{2})/", $field_value)) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); } break; case 'float': case 'double': if ($field_value != (double) $field_value) { - return $this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp); + return($this->raiseError('"'.$field_value.'" is not of type "'.$field_def['type'].'"', $xp)); }; $field_value = (double) $field_value; break; } - return TRUE; + return(TRUE); } function raiseError($msg, $xp = NULL) @@ -434,17 +434,17 @@ $this->error = PEAR::raiseError(NULL, MDB_ERROR_MANAGER_PARSE, NULL, NULL, $error, 'MDB_Error', TRUE); }; - return FALSE; + return(FALSE); } function is_boolean(&$value) { if (is_int($value) && ($value == 0 || $value == 1)) { - return TRUE; + return(TRUE); }; if ($value === '1' || $value === '0') { $value = (int) $value; - return TRUE; + return(TRUE); }; switch($value) { @@ -461,9 +461,9 @@ $value = 1; break; default: - return FALSE; + return(FALSE); }; - return TRUE; + return(TRUE); } function cdataHandler($xp, $data) Index: pear/MDB/MDB/Manager.php diff -u pear/MDB/MDB/Manager.php:1.68 pear/MDB/MDB/Manager.php:1.69 --- pear/MDB/MDB/Manager.php:1.68 Mon Jan 13 09:26:23 2003 +++ pear/MDB/MDB/Manager.php Sun Jan 19 06:13:35 2003 @@ -42,10 +42,10 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: Manager.php,v 1.68 2003/01/13 14:26:23 lsmith Exp $ +// $Id: Manager.php,v 1.69 2003/01/19 11:13:35 lsmith Exp $ // -require_once 'MDB/Parser.php'; +require_once('MDB/Parser.php'); define('MDB_MANAGER_DUMP_ALL', 0); define('MDB_MANAGER_DUMP_STRUCTURE', 1); @@ -134,11 +134,11 @@ { // The error is yet a MDB error object if (is_object($code)) { - return PEAR::raiseError($code, NULL, NULL, NULL, NULL, NULL, TRUE); + return(PEAR::raiseError($code, NULL, NULL, NULL, NULL, NULL, TRUE)); } - return PEAR::raiseError(NULL, $code, $mode, $options, $userinfo, - 'MDB_Error', TRUE); + return(PEAR::raiseError(NULL, $code, $mode, $options, $userinfo, + 'MDB_Error', TRUE)); } // }}} @@ -169,7 +169,7 @@ */ function debugOutput() { - return ($this->database->debugOutput()); + return($this->database->debugOutput()); } // }}} @@ -216,9 +216,9 @@ { if (isset($this->options[$option])) { $this->options[$option] = $value; - return MDB_OK; + return(MDB_OK); } - return $this->raiseError(MDB_ERROR_UNSUPPORTED, '', '', "unknown option $option"); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, '', '', "unknown option $option")); } // }}} @@ -234,9 +234,9 @@ function getOption($option) { if (isset($this->options[$option])) { - return $this->options[$option]; + return($this->options[$option]); } - return $this->raiseError(MDB_ERROR_UNSUPPORTED, '', '', "unknown option $option"); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, '', '', "unknown option $option")); } // }}} @@ -268,15 +268,14 @@ } else { $this->database =& MDB::connect($dbinfo, $options); if (MDB::isError($this->database)) { - $error = $this->database; $this->database = ''; - return $error; + return($this->database); } } if (isset($options['debug'])) { $this->options['debug'] = $options['debug']; } - return (MDB_OK); + return(MDB_OK); } // }}} @@ -307,7 +306,7 @@ */ function setDatabase($name) { - return ($this->database->setDatabase($name)); + return($this->database->setDatabase($name)); } // }}} @@ -336,18 +335,18 @@ $this->database->debug('Overwritting Table'); $result = $this->database->dropTable($table_name); if (MDB::isError($result)) { - return $result; + return($result); } $result = $this->database->createTable($table_name, $table['FIELDS']); if (MDB::isError($result)) { - return $result; + return($result); } } else { $result = MDB_OK; } } else { $this->database->debug('Create table error: '.$table_name); - return $result; + return($result); } } if (isset($table['initialization']) && is_array($table['initialization'])) { @@ -458,8 +457,8 @@ }; if (!MDB::isError($result) && isset($table['INDEXES']) && is_array($table['INDEXES'])) { if (!$this->database->support('Indexes')) { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'indexes are not supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'indexes are not supported')); } foreach($table['INDEXES'] as $index_name => $index) { $this->expectError(MDB_ERROR_ALREADY_EXISTS); @@ -496,9 +495,9 @@ .$result->getMessage().' ('.$result->getUserinfo(),'))', 'MDB_Error', TRUE); } - return $result; + return($result); } - return (MDB_OK); + return(MDB_OK); } // }}} @@ -513,7 +512,7 @@ */ function _dropTable($table_name) { - return $this->database->dropTable($table_name); + return($this->database->dropTable($table_name)); } // }}} @@ -534,12 +533,12 @@ function _createSequence($sequence_name, $sequence, $created_on_table, $overwrite = FALSE) { if (!$this->database->support('Sequences')) { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'sequences are not supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'sequences are not supported')); } if (!isset($sequence_name) || !strcmp($sequence_name, '')) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, - 'no valid sequence name specified'); + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + 'no valid sequence name specified')); } $this->database->debug('Create sequence: '.$sequence_name); if (isset($sequence['start']) && $sequence['start'] != '') { @@ -552,7 +551,7 @@ } $start = $this->database->queryOne("SELECT $field FROM $table"); if (MDB::isError($start)) { - return $start; + return($start); } } else { $start = 1; @@ -568,18 +567,18 @@ $this->database->debug('Overwritting Sequence'); $result = $this->database->dropSequence($sequence_name); if (MDB::isError($result)) { - return $result; + return($result); } $result = $this->database->createSequence($sequence_name, $start); if (MDB::isError($result)) { - return $result; + return($result); } } else { - return MDB_OK; + return(MDB_OK); } } else { $this->database->debug('Create sequence error: '.$sequence_name); - return $result; + return($result); } } } @@ -597,15 +596,15 @@ function _dropSequence($sequence_name) { if (!$this->database->support('Sequences')) { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'sequences are not supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'sequences are not supported')); } $this->database->debug('Dropping sequence: '.$sequence_name); if (!isset($sequence_name) || !strcmp($sequence_name, '')) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, - 'no valid sequence name specified'); + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + 'no valid sequence name specified')); } - return $this->database->dropSequence($sequence_name); + return($this->database->dropSequence($sequence_name)); } // }}} @@ -626,8 +625,8 @@ if (!isset($this->database_definition['name']) || !strcmp($this->database_definition['name'], '')) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, - 'no valid database name specified'); + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + 'no valid database name specified')); } $create = (isset($this->database_definition['create']) && $this->database_definition['create']); $overwrite = (isset($this->database_definition['overwrite']) && $this->database_definition['overwrite']); @@ -643,18 +642,18 @@ $this->database->debug('Overwritting Database'); $result = $this->database->dropDatabase($this->database_definition['name']); if (MDB::isError($result)) { - return $result; + return($result); } $result = $this->database->createDatabase($this->database_definition['name']); if (MDB::isError($result)) { - return $result; + return($result); } } else { $result = MDB_OK; } } else { $this->database->debug('Create database error.'); - return $result; + return($result); } } } @@ -662,7 +661,7 @@ if (($support_transactions = $this->database->support('Transactions')) && MDB::isError($result = $this->database->autoCommit(FALSE))) { - return $result; + return($result); } $created_objects = 0; if(isset($this->database_definition['TABLES']) @@ -723,17 +722,17 @@ && $create && MDB::isError($res = $this->database->dropDatabase($this->database_definition['name']))) { - return $this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, + return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, 'Could not drop the created database after unsuccessful creation attempt (' .$res->getMessage().' ('.$res->getUserinfo(),'))', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } if(MDB::isError($result)) { - return $result; + return($result); } - return (MDB_OK); + return(MDB_OK); } // }}} @@ -766,7 +765,7 @@ $changes[$definition][$item][$change_data_name] = $change_data; } } - return (MDB_OK); + return(MDB_OK); } // }}} @@ -797,9 +796,9 @@ $this->database->debug("Renamed table '$was_table_name' to '$table_name'"); } if (isset($defined_tables[$was_table_name])) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'the table "'.$was_table_name.'" was specified as base of more than of table of the database', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $defined_tables[$was_table_name] = 1; @@ -818,7 +817,7 @@ if (strcmp($was_field_name, $field_name)) { $query = $this->database->getFieldDeclaration($field_name, $field); if (MDB::isError($query)) { - return $query; + return($query); } $this->_addDefinitionChange($changes, 'TABLES', $was_table_name, array( @@ -833,9 +832,9 @@ $this->database->debug("Renamed field '$was_field_name' to '$field_name' in table '$table_name'"); } if (isset($defined_fields[$was_field_name])) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'the field "'.$was_table_name.'" was specified as base of more than one field of table', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $defined_fields[$was_field_name] = 1; $change = array(); @@ -867,9 +866,9 @@ case 'decimal': break; default: - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, 'type "'.$field['type'].'" is not yet supported', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $previous_notnull = isset($previous_fields[$was_field_name]['notnull']); @@ -906,7 +905,7 @@ if (count($change)) { $query = $this->database->getFieldDeclaration($field_name, $field); if (MDB::isError($query)) { - return $query; + return($query); } $change['Declaration'] = $query; $change['Definition'] = $field; @@ -914,15 +913,15 @@ } } else { if (strcmp($field_name, $was_field_name)) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'it was specified a previous field name ("' .$was_field_name.'") for field "'.$field_name.'" of table "' .$table_name.'" that does not exist', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $query = $this->database->getFieldDeclaration($field_name, $field); if (MDB::isError($query)) { - return $query; + return($query); } $change['Declaration'] = $query; $this->_addDefinitionChange($changes, 'TABLES', $table_name, array('AddedFields' => array($field_name => $change))); @@ -967,10 +966,10 @@ $this->database->debug("Changed index '$was_index_name' name to '$index_name' in table '$table_name'"); } if (isset($defined_indexes[$was_index_name])) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'the index "'.$was_index_name.'" was specified as base of' .' more than one index of table "'.$table_name.'"', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $defined_indexes[$was_index_name] = 1; @@ -1015,10 +1014,10 @@ } } else { if (strcmp($index_name, $was_index_name)) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'it was specified a previous index name ("'.$was_index_name .') for index "'.$index_name.'" of table "'.$table_name.'" that does not exist', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->_addDefinitionChange($changes, 'INDEXES', $table_name,array('AddedIndexes' => array($index_name => $indexes[$index_name]))); $this->database->debug("Added index '$index_name' to table '$table_name'"); @@ -1032,10 +1031,10 @@ } } else { if (strcmp($table_name, $was_table_name)) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'it was specified a previous table name ("' .$was_table_name.'") for table "'.$table_name.'" that does not exist', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->_addDefinitionChange($changes, 'TABLES', $table_name,array('Add' => 1)); $this->database->debug("Added table '$table_name'"); @@ -1064,10 +1063,10 @@ $this->database->debug("Renamed sequence '$was_sequence_name' to '$sequence_name'"); } if (isset($defined_sequences[$was_sequence_name])) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'the sequence "'.$was_sequence_name.'" was specified as base' .' of more than of sequence of the database', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $defined_sequences[$was_sequence_name] = 1; $change = array(); @@ -1086,10 +1085,10 @@ } } else { if (strcmp($sequence_name, $was_sequence_name)) { - return $this->raiseError(MDB_ERROR_INVALID, NULL, NULL, + return($this->raiseError(MDB_ERROR_INVALID, NULL, NULL, 'it was specified a previous sequence name ("'.$was_sequence_name .'") for sequence "'.$sequence_name.'" that does not exist', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->_addDefinitionChange($changes, 'SEQUENCES', $sequence_name, array('Add' => 1)); $this->database->debug("Added sequence '$sequence_name'"); @@ -1105,7 +1104,7 @@ } } } - return ($changes); + return($changes); } // }}} @@ -1134,14 +1133,14 @@ } $result = $this->database->alterTable($table_name, $table, 1); if (MDB::isError($result)) { - return $result; + return($result); } } } if (isset($changes['SEQUENCES']) && is_array($changes['SEQUENCES'])) { if (!$this->database->support('Sequences')) { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'sequences are not supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'sequences are not supported')); } foreach($changes['SEQUENCES'] as $sequence) { if (isset($sequence['Add']) @@ -1150,14 +1149,14 @@ { continue; } - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'some sequences changes are not yet supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'some sequences changes are not yet supported')); } } if (isset($changes['INDEXES']) && is_array($changes['INDEXES'])) { if (!$this->database->support('Indexes')) { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'indexes are not supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'indexes are not supported')); } foreach($changes['INDEXES'] as $index) { $table_changes = count($index); @@ -1171,8 +1170,8 @@ $table_changes--; } if ($table_changes) { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'index alteration not yet supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'index alteration not yet supported')); } } } @@ -1181,7 +1180,7 @@ if (($support_transactions = $this->database->support('Transactions')) && MDB::isError($result = $this->database->autoCommit(FALSE))) { - return $result; + return($result); } $error = ''; $alterations = 0; @@ -1290,8 +1289,8 @@ $alterations++; } } else { - return $this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, - 'changing sequences is not yet supported'); + return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL, + 'changing sequences is not yet supported')); } } } @@ -1356,7 +1355,7 @@ } } $this->database->setDatabase($previous_database_name); - return $result; + return($result); } // }}} @@ -1423,7 +1422,7 @@ $buffer .= " <on>$eol <table>".$sequence_definition['on']['table']."</table>$eol <field>".$sequence_definition['on']['field']."</field>$eol </on>$eol"; } $buffer .= " </sequence>$eol"; - return ($buffer); + return($buffer); } // }}} @@ -1447,16 +1446,16 @@ $parser =& new MDB_Parser($variables, $fail_on_invalid_names); $result = $parser->setInputFile($input_file); if (MDB::isError($result)) { - return $result; + return($result); }; $result = $parser->parse(); if (MDB::isError($result)) { - return $result; + return($result); }; if (MDB::isError($parser->error)) { - return $parser->error; + return($parser->error); } - return $parser->database_definition; + return($parser->database_definition); } // }}} @@ -1585,7 +1584,7 @@ } } } - return (MDB_OK); + return(MDB_OK); } // }}} @@ -1614,14 +1613,14 @@ $database_definition = $this->parseDatabaseDefinitionFile($schema_file, $variables, $this->options['fail_on_invalid_names']); if (MDB::isError($database_definition)) { - return $database_definition; + return($database_definition); } $this->database_definition = $database_definition; $result = $this->connect($setup_arguments); if (MDB::isError($result)) { - return $result; + return($result); } return($this->dumpDatabase($dump_arguments)); @@ -1642,7 +1641,7 @@ { $database = $this->database->database_name; if (strlen($database) == 0) { - return ('it was not specified a valid database name'); + return('it was not specified a valid database name'); } $this->database_definition = array( 'name' => $database, @@ -1651,13 +1650,13 @@ ); $tables = $this->database->listTables(); if (MDB::isError($tables)) { - return ($tables); + return($tables); } for($table = 0; $table < count($tables); $table++) { $table_name = $tables[$table]; $fields = $this->database->listTableFields($table_name); if (MDB::isError($fields)) { - return ($fields); + return($fields); } $this->database_definition['TABLES'][$table_name] = array('FIELDS' => array()); for($field = 0; $field < count($fields); $field++) @@ -1665,7 +1664,7 @@ $field_name = $fields[$field]; $definition = $this->database->getTableFieldDefinition($table_name, $field_name); if (MDB::isError($definition)) { - return ($definition); + return($definition); } $this->database_definition['TABLES'][$table_name]['FIELDS'][$field_name] = $definition[0][0]; $field_choices = count($definition[0]); @@ -1675,7 +1674,7 @@ $this->database_definition['TABLES'][$table_name]['FIELDS'][$field_name]['CHOICES'] = array(); foreach($definition[0] as $field_choice) { $this->database_definition['TABLES'][$table_name]['FIELDS'][$field_name]['CHOICES'][] = $field_choice; - $warning .= "choice #".($field_choice_cnt).": ".serialize($field_choice); + $warning .= 'choice #'.($field_choice_cnt).': '.serialize($field_choice); $field_choice_cnt++; } $this->warnings[] = $warning; @@ -1756,7 +1755,7 @@ } $sequences = $this->database->listSequences(); if (MDB::isError($sequences)) { - return ($sequences); + return($sequences); } if(is_array($sequences) && count($sequences) > 0 && !isset($this->database_definition['SEQUENCES'])) { $this->database_definition['SEQUENCES'] = array(); @@ -1811,8 +1810,8 @@ $dump_definition = TRUE; } else { if(!$this->database) { - return $this->raiseError(MDB_ERROR_NODBSELECTED, - NULL, NULL, 'please connect to a RDBMS first'); + return($this->raiseError(MDB_ERROR_NODBSELECTED, + NULL, NULL, 'please connect to a RDBMS first')); } $this->getDefinitionFromDatabase(); $dump_definition = FALSE; @@ -1824,12 +1823,12 @@ } elseif (function_exists($arguments['Output'])) { $output = $arguments['Output']; } else { - return $this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, - 'no valid output function specified'); + return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, + 'no valid output function specified')); } } else { - return $this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, - 'no output method specified'); + return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, + 'no output method specified')); } if (isset($arguments['EndOfLine'])) { $eol = $arguments['EndOfLine']; @@ -1868,8 +1867,8 @@ if(isset($table['FIELDS']) && is_array($table['FIELDS'])) { foreach($table['FIELDS'] as $field_name => $field) { if (!isset($field['type'])) { - return $this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, - 'it was not specified the type of the field "'.$field_name.'" of the table "'.$table_name); + return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, + 'it was not specified the type of the field "'.$field_name.'" of the table "'.$table_name)); } $buffer .=("$eol <field>$eol <name>$field_name</name>$eol <type>".$field['type']."</type>$eol"); if(in_array($field_name, array_keys($this->invalid_names))) { @@ -1956,7 +1955,7 @@ $query = 'SELECT '.implode(',',array_keys($table['FIELDS']))." FROM $table_name"; $result = $this->database->queryAll($query, $types, MDB_FETCHMODE_ASSOC); if (MDB::isError($result)) { - return $result; + return($result); } $rows = count($result); if ($rows > 0) { @@ -2010,7 +2009,7 @@ { $result = $this->_dumpSequence($sequences[$table_name][$sequence], $eol, $dump); if (MDB::isError($result)) { - return $result; + return($result); } if ($output) { $output($result); @@ -2028,7 +2027,7 @@ { $result = $this->_dumpSequence($sequences[''][$sequence], $eol, $dump); if (MDB::isError($result)) { - return $result; + return($result); } if ($output) { $output($result); @@ -2086,51 +2085,51 @@ $database_definition = $this->parseDatabaseDefinitionFile($current_schema_file, $variables, $this->options['fail_on_invalid_names']); if (MDB::isError($database_definition)) { - return $database_definition; + return($database_definition); } $this->database_definition = $database_definition; $copy = 0; $databases = $this->database->listDatabases(); if (MDB::isError($databases)) { - return $this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, - 'Could not verify if database allready exists'); + return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, + 'Could not verify if database allready exists')); } if (is_array($databases) && in_array($this->database_definition['name'], $databases) && $previous_schema_file && file_exists($previous_schema_file)) { $previous_definition = $this->parseDatabaseDefinitionFile($previous_schema_file, $variables, 0); if (MDB::isError($previous_definition)) { - return $previous_definition; + return($previous_definition); } $changes = $this->_compareDefinitions($previous_definition); if (MDB::isError($changes)) { - return $changes; + return($changes); } if (isset($changes) && is_array($changes)) { $result = $this->_alterDatabase($previous_definition, $changes); if (MDB::isError($result)) { - return $result; + return($result); } $copy = 1; if($this->options['debug']) { $result = $this->_debugDatabaseChanges($changes); if (MDB::isError($result)) { - return $result; + return($result); } } } } else { $result = $this->_createDatabase(); if (MDB::isError($result)) { - return $result; + return($result); } $copy = 1; } if ($copy && $previous_schema_file && !copy($current_schema_file, $previous_schema_file)) { - return $this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, - 'Could not copy the new database definition file to the current file'); + return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL, + 'Could not copy the new database definition file to the current file')); } - return (MDB_OK); + return(MDB_OK); } // }}} Index: pear/MDB/MDB/Date.php diff -u pear/MDB/MDB/Date.php:1.10 pear/MDB/MDB/Date.php:1.11 --- pear/MDB/MDB/Date.php:1.10 Sat Nov 23 18:51:25 2002 +++ pear/MDB/MDB/Date.php Sun Jan 19 06:13:36 2003 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: Date.php,v 1.10 2002/11/23 23:51:25 lsmith Exp $ +// $Id: Date.php,v 1.11 2003/01/19 11:13:36 lsmith Exp $ // /** @@ -163,7 +163,7 @@ { list($arr['year'], $arr['month'], $arr['day'], $arr['hour'], $arr['minute'], $arr['second']) = sscanf($mdb_timestamp, "%04u-%02u-%02u %02u:%02u:%02u"); - return $arr; + return($arr); } // }}} Index: pear/MDB/MDB/Modules/LOB.php diff -u pear/MDB/MDB/Modules/LOB.php:1.27 pear/MDB/MDB/Modules/LOB.php:1.28 --- pear/MDB/MDB/Modules/LOB.php:1.27 Thu Jan 16 10:58:22 2003 +++ pear/MDB/MDB/Modules/LOB.php Sun Jan 19 06:13:36 2003 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: LOB.php,v 1.27 2003/01/16 15:58:22 lsmith Exp $ +// $Id: LOB.php,v 1.28 2003/01/19 11:13:36 lsmith Exp $ // if(!defined('MDB_LOB_INCLUDED')) @@ -69,7 +69,7 @@ if(isset($arguments['Data'])) { $this->data = $arguments['Data']; } - return (MDB_OK); + return(MDB_OK); } function destroy() @@ -98,12 +98,12 @@ function create(&$arguments) { if(!isset($arguments['ResultLOB'])) { - return PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, 'it was not specified a result Lob identifier', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->result_lob = $arguments['ResultLOB']; - return (MDB_OK); + return(MDB_OK); } function destroy() @@ -120,12 +120,12 @@ { $read_length = $this->database->_readResultLob($this->result_lob, $data, $length); if (MDB::isError($read_length)) { - return $read_length; + return($read_length); } if($read_length < 0) { - return PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, 'data was read beyond end of data source', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } return($read_length); } @@ -140,9 +140,9 @@ { if(isset($arguments['File'])) { if(intval($arguments['File']) == 0) { - return PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, 'it was specified an invalid input file identifier', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->file = $arguments['File']; } @@ -150,18 +150,18 @@ { if(isset($arguments['FileName'])) { if((!$this->file = fopen($arguments['FileName'], 'rb'))) { - return PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND, NULL, NULL, 'could not open specified input file ("'.$arguments['FileName'].'")', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->opened_file = 1; } else { - return PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, 'it was not specified the input file', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } } - return (MDB_OK); + return(MDB_OK); } function destroy() @@ -180,9 +180,9 @@ function readLob(&$data, $length) { if(gettype($data = @fread($this->file, $length))!= 'string') { - return PEAR::raiseError(NULL, MDB_ERROR, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR, NULL, NULL, 'could not read from the input file', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } return(strlen($data)); } @@ -200,39 +200,39 @@ { if(isset($arguments['BufferLength'])) { if($arguments['BufferLength'] <= 0) { - return PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, 'it was specified an invalid buffer length', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->buffer_length = $arguments['BufferLength']; } if(isset($arguments['File'])) { if(intval($arguments['File']) == 0) { - return PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, 'it was specified an invalid output file identifier', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->file = $arguments['File']; } else { if(isset($arguments['FileName'])) { if((!$this->file = fopen($arguments['FileName'],'wb'))) { - return PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND, NULL, NULL, 'could not open specified output file ("'.$arguments['FileName'].'")', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->opened_file = 1; } else { - return PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, 'it was not specified the output file', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } } if(isset($arguments['LOB'])) { if(!is_object($arguments['LOB'])) { $this->destroy(); - return PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_INVALID, NULL, NULL, 'it was specified an invalid input large object identifier', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->input_lob = $arguments['LOB']; } else { @@ -251,19 +251,19 @@ } if($this->input_lob == 0) { $this->destroy(); - return PEAR::raiseError(NULL, MDB_ERROR, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR, NULL, NULL, 'could not fetch the input result large object', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } $this->opened_lob = 1; } else { $this->destroy(); - return PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR_NEED_MORE_DATA, NULL, NULL, 'it was not specified the input large object identifier', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } } - return (MDB_OK); + return(MDB_OK); } function destroy() @@ -297,13 +297,13 @@ if(MDB::isError($result = $this->database-> readLob($this->input_lob, $buffer, $buffer_length))) { - return $result; + return($result); } $read = strlen($buffer); if(@fwrite($this->file, $buffer, $read)!= $read) { - return PEAR::raiseError(NULL, MDB_ERROR, NULL, NULL, + return(PEAR::raiseError(NULL, MDB_ERROR, NULL, NULL, 'could not write to the output file', - 'MDB_Error', TRUE); + 'MDB_Error', TRUE)); } } $written_full += $written; Index: pear/MDB/MDB/Modules/Manager/Common.php diff -u pear/MDB/MDB/Modules/Manager/Common.php:1.30 pear/MDB/MDB/Modules/Manager/Common.php:1.31 --- pear/MDB/MDB/Modules/Manager/Common.php:1.30 Thu Jan 16 11:06:55 2003 +++ pear/MDB/MDB/Modules/Manager/Common.php Sun Jan 19 06:13:36 2003 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.30 2003/01/16 16:06:55 lsmith Exp $ +// $Id: Common.php,v 1.31 2003/01/19 11:13:36 lsmith Exp $ // if(!defined('MDB_MANAGER_COMMON_INCLUDED')) @@ -84,43 +84,43 @@ function getFieldDeclaration(&$db, $field_name, $field) { if (!strcmp($field_name, '')) { - return $db->raiseError(MDB_ERROR_NOSUCHFIELD, '', '', - "Get field: it was not specified a valid field name (\"$field_name\")"); + return($db->raiseError(MDB_ERROR_NOSUCHFIELD, '', '', + 'Get field: it was not specified a valid field name ("'.$field_name.'")')); } switch($field['type']) { case 'integer': - return $db->getIntegerDeclaration($field_name, $field); + return($db->getIntegerDeclaration($field_name, $field)); break; case 'text': - return $db->getTextDeclaration($field_name, $field); + return($db->getTextDeclaration($field_name, $field)); break; case 'clob': - return $db->getClobDeclaration($field_name, $field); + return($db->getClobDeclaration($field_name, $field)); break; case 'blob': - return $db->getBlobDeclaration($field_name, $field); + return($db->getBlobDeclaration($field_name, $field)); break; case 'boolean': - return $db->getBooleanDeclaration($field_name, $field); + return($db->getBooleanDeclaration($field_name, $field)); break; case 'date': - return $db->getDateDeclaration($field_name, $field); + return($db->getDateDeclaration($field_name, $field)); break; case 'timestamp': - return $db->getTimestampDeclaration($field_name, $field); + return($db->getTimestampDeclaration($field_name, $field)); break; case 'time': - return $db->getTimeDeclaration($field_name, $field); + return($db->getTimeDeclaration($field_name, $field)); break; case 'float': - return $db->getFloatDeclaration($field_name, $field); + return($db->getFloatDeclaration($field_name, $field)); break; case 'decimal': - return $db->getDecimalDeclaration($field_name, $field); + return($db->getDecimalDeclaration($field_name, $field)); break; default: - return $db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', - 'Get field: type "'.$field['type'].'" is not yet supported'); + return($db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', + 'Get field: type "'.$field['type'].'" is not yet supported')); break; } } @@ -160,14 +160,14 @@ foreach($fields as $field_name => $field) { $query = $db->getFieldDeclaration($field_name, $field); if (MDB::isError($query)) { - return $query; + return($query); } $query_fields[] = $query; } - return (implode(',',$query_fields)); + return(implode(',',$query_fields)); } - return PEAR::raiseError(NULL, MDB_ERROR_MANAGER, NULL, NULL, - 'the definition of the table "'.$table_name.'" does not contain any fields', 'MDB_Error', TRUE); + return(PEAR::raiseError(NULL, MDB_ERROR_MANAGER, NULL, NULL, + 'the definition of the table "'.$table_name.'" does not contain any fields', 'MDB_Error', TRUE)); } // }}} @@ -185,9 +185,9 @@ $seq_pattern = '/^'.preg_replace('/%s/', '([a-z0-9_]+)', $db->options['seqname_format']).'$/i'; $seq_name = preg_replace($seq_pattern, '\\1', $sqn); if($seq_name && $sqn == $db->getSequenceName($seq_name)) { - return $seq_name; + return($seq_name); } - return FALSE; + return(FALSE); } // }}} @@ -203,8 +203,8 @@ */ function createDatabase(&$db, $database) { - return $db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', - 'Create database: database creation is not supported'); + return($db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', + 'Create database: database creation is not supported')); } // }}} @@ -220,8 +220,8 @@ */ function dropDatabase(&$db, $database) { - return $db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', - 'Drop database: database dropping is not supported'); + return($db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', + 'Drop database: database dropping is not supported')); } // }}} @@ -261,16 +261,16 @@ function createTable(&$db, $name, $fields) { if (!isset($name) || !strcmp($name, '')) { - return $db->raiseError(MDB_ERROR_CANNOT_CREATE, '', '', 'no valid table name specified'); + return($db->raiseError(MDB_ERROR_CANNOT_CREATE, '', '', 'no valid table name specified')); } if (count($fields) == 0) { - return $db->raiseError(MDB_ERROR_CANNOT_CREATE, '', '', 'no fields specified for table "'.$name.'"'); + return($db->raiseError(MDB_ERROR_CANNOT_CREATE, '', '', 'no fields specified for table "'.$name.'"')); } $query_fields = ''; if (!$db->getFieldDeclarationList($fields, $query_fields)) { - return $db->raiseError(MDB_ERROR_CANNOT_CREATE, '', '', 'unkown error'); + return($db->raiseError(MDB_ERROR_CANNOT_CREATE, '', '', 'unkown error')); } - return ($db->query("CREATE TABLE $name ($query_fields)")); + return($db->query("CREATE TABLE $name ($query_fields)")); } // }}} @@ -286,7 +286,7 @@ */ function dropTable(&$db, $name) { - return ($db->query("DROP TABLE $name")); + return($db->query("DROP TABLE $name")); } // }}} @@ -389,8 +389,8 @@ */ function alterTable(&$db, $name, $changes, $check) { - return $db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', - 'Alter table: database table alterations are not supported'); + return($db->raiseError(MDB_ERROR_UNSUPPORTED, '', '', + 'Alter table: database table alterations are not supported')); } // }}} @@ -405,8 +405,8 @@ */ function listDatabases(&$db) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List Databses: list databases is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List Databses: list databases is not supported')); } // }}} @@ -421,8 +421,8 @@ */ function listUsers(&$db) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List User: list user is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List User: list user is not supported')); } // }}} @@ -437,8 +437,8 @@ */ function listViews(&$db) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List View: list view is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List View: list view is not supported')); } // }}} @@ -453,8 +453,8 @@ */ function listFunctions(&$db) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List Function: list function is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List Function: list function is not supported')); } // }}} @@ -469,8 +469,8 @@ */ function listTables(&$db) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List tables: list tables is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List tables: list tables is not supported')); } // }}} @@ -486,8 +486,8 @@ */ function listTableFields(&$db, $table) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List table fields: list table fields is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List table fields: list table fields is not supported')); } // }}} @@ -504,8 +504,8 @@ */ function getTableFieldDefinition(&$db, $table, $field) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'Get table field definition: table field definition is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'Get table field definition: table field definition is not supported')); } // }}} @@ -571,7 +571,7 @@ } } $query.= ')'; - return ($db->query($query)); + return($db->query($query)); } // }}} @@ -588,7 +588,7 @@ */ function dropIndex(&$db, $table, $name) { - return ($db->query("DROP INDEX $name")); + return($db->query("DROP INDEX $name")); } // }}} @@ -604,8 +604,8 @@ */ function listTableIndexes(&$db, $table) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List table indexes: List Indexes is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List table indexes: List Indexes is not supported')); } // }}} @@ -622,8 +622,8 @@ */ function getTableIndexDefinition(&$db, $table, $index) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'get table index definition: getting index definition is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'get table index definition: getting index definition is not supported')); } // }}} @@ -640,8 +640,8 @@ */ function createSequence(&$db, $name, $start) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'Create Sequence: sequence creation not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'Create Sequence: sequence creation not supported')); } // }}} @@ -657,8 +657,8 @@ */ function dropSequence(&$db, $name) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'Drop Sequence: sequence dropping not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'Drop Sequence: sequence dropping not supported')); } // }}} @@ -673,8 +673,8 @@ */ function listSequences(&$db) { - return $db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', - 'List sequences: List sequences is not supported'); + return($db->raiseError(MDB_ERROR_NOT_CAPABLE, '', '', + 'List sequences: List sequences is not supported')); } // }}} @@ -704,7 +704,7 @@ { $start = $db->currId($sequence); if (MDB::isError($start)) { - return ($start); + return($start); } if ($db->support('CurrId')) { $start++;
« previous php.pear.cvs (#8406) next »