cvs: pear /MDB2_Schema/MDB2/Schema Validate.php

From: Date: Sat, 19 Aug 2006 13:48:26 +0000
Subject: cvs: pear /MDB2_Schema/MDB2/Schema Validate.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-41723@lists.php.net to get a copy of this message
lsmith Sat Aug 19 13:48:26 2006 UTC Modified files: /pear/MDB2_Schema/MDB2/Schema Validate.php Log: - simplified last fix and fixed parse error http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/MDB2/Schema/Validate.php?r1=1.10&r2=1.11&diff_format=u Index: pear/MDB2_Schema/MDB2/Schema/Validate.php diff -u pear/MDB2_Schema/MDB2/Schema/Validate.php:1.10 pear/MDB2_Schema/MDB2/Schema/Validate.php:1.11 --- pear/MDB2_Schema/MDB2/Schema/Validate.php:1.10 Sat Aug 19 13:35:03 2006 +++ pear/MDB2_Schema/MDB2/Schema/Validate.php Sat Aug 19 13:48:26 2006 @@ -43,7 +43,7 @@ // | Author: Igor Feghali <ifeghali@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Validate.php,v 1.10 2006/08/19 13:35:03 ifeghali Exp $ +// $Id: Validate.php,v 1.11 2006/08/19 13:48:26 lsmith Exp $ // /** @@ -68,7 +68,7 @@ } elseif ($this->fail_on_invalid_names === true) { $this->fail_on_invalid_names = array_keys($GLOBALS['_MDB2_Schema_Reserved']); } else { - $this->fail_on_invalid_names = false; + $this->fail_on_invalid_names = array(); } $this->valid_types = $valid_types; $this->force_defaults = $force_defaults; @@ -119,7 +119,7 @@ if (!$table_name) { return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE_NO_TABLE_NAME, 'a table has to have a name'); - } elseif (is_array($this->fail_on_invalid_names) && !empty($this->fail_on_invalid_names)) { + } elseif (is_array($this->fail_on_invalid_names)) { $name = strtoupper($table_name); foreach ($this->fail_on_invalid_names as $rdbms) { if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) { @@ -216,7 +216,7 @@ 'field "'.$field_name.'" already exists'); } - if (is_array($this->fail_on_invalid_names) && !empty($this->fail_on_invalid_names)) + if (is_array($this->fail_on_invalid_names)) { $name = strtoupper($field_name); foreach ($this->fail_on_invalid_names as $rdbms) { if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) { @@ -340,7 +340,7 @@ if (!$sequence_name) { return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE_NO_SEQUENCE_NAME, 'a sequence has to have a name'); - } elseif (is_array($this->fail_on_invalid_names) && !empty($this->fail_on_invalid_names)) + } elseif (is_array($this->fail_on_invalid_names)) { $name = strtoupper($sequence_name); foreach ($this->fail_on_invalid_names as $rdbms) { if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) { @@ -374,7 +374,7 @@ if (!isset($database['name']) || !$database['name']) { return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE_NO_DATABASE_NAME, 'a database has to have a name'); - } elseif (is_array($this->fail_on_invalid_names) && !empty($this->fail_on_invalid_names)) + } elseif (is_array($this->fail_on_invalid_names)) { $name = strtoupper($database['name']); foreach ($this->fail_on_invalid_names as $rdbms) { if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) {

« previous php.pear.cvs (#41723) next »