[Openfirst-cvscommit] SF.net SVN: openfirst: [200] trunk/src/includes
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-23 22:31:32
|
Revision: 200 Author: astronouth7303 Date: 2006-06-23 15:31:26 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=200&view=rev Log Message: ----------- Found bug in key altering, was case sensitive. Now it isn't. Modified Paths: -------------- trunk/src/includes/dbase.php trunk/src/includes/xmlModule.php Modified: trunk/src/includes/dbase.php =================================================================== --- trunk/src/includes/dbase.php 2006-06-23 05:11:49 UTC (rev 199) +++ trunk/src/includes/dbase.php 2006-06-23 22:31:26 UTC (rev 200) @@ -585,9 +585,9 @@ foreach($table->getKeys() as $keyname) { $key = $table->getKey($keyname); $skey = ''; - if ($key->getType() == 'PRIMARY') { + if (strcasecmp($key->getType(), 'PRIMARY') == 0) { $skey = 'PRIMARY KEY'; - } else if ($key->getType() == 'UNIQUE') { + } else if (strcasecmp($key->getType(), 'UNIQUE') == 0) { $skey = 'UNIQUE '.$this->quoteField($key->getName()); } else { $skey = 'INDEX '.$this->quoteField($key->getName()); Modified: trunk/src/includes/xmlModule.php =================================================================== --- trunk/src/includes/xmlModule.php 2006-06-23 05:11:49 UTC (rev 199) +++ trunk/src/includes/xmlModule.php 2006-06-23 22:31:26 UTC (rev 200) @@ -653,7 +653,7 @@ $this->mName = $this->mType = false; if (isset($args[0])) $this->mName = $args[0]; - if (isset($args[1])) $this->mType = $args[1]; + if (isset($args[1])) $this->mType = strtoupper($args[1]); if ( (strcasecmp($this->mType, 'primary') == 0) || (strcasecmp($this->mName, 'primary') == 0) ) { $this->mType = 'PRIMARY'; @@ -823,4 +823,4 @@ } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |