[Cs-webdbupgrade-commits] SF.net SVN: cs-webdbupgrade:[32] trunk/0.1/cs_webdbupgrade.class.php
Status: Inactive
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-08-06 20:51:56
|
Revision: 32
http://cs-webdbupgrade.svn.sourceforge.net/cs-webdbupgrade/?rev=32&view=rev
Author: crazedsanity
Date: 2009-08-06 20:51:45 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
Changes to go along with the v0.2 release.
/cs_webdbupgrade.class.php:
* update_database_version():
-- only update the version_string field: v0.2 no longer has the
"pieces" columns (version_major, version_minor, etc).
Modified Paths:
--------------
trunk/0.1/cs_webdbupgrade.class.php
Modified: trunk/0.1/cs_webdbupgrade.class.php
===================================================================
--- trunk/0.1/cs_webdbupgrade.class.php 2009-08-06 20:45:38 UTC (rev 31)
+++ trunk/0.1/cs_webdbupgrade.class.php 2009-08-06 20:51:45 UTC (rev 32)
@@ -619,19 +619,14 @@
* so the version there is consistent with all the others.
*/
protected function update_database_version($newVersionString) {
- $versionArr = $this->parse_version_string($newVersionString);
+ $versionInfo = $this->parse_version_string($newVersionString);
- $queryArr = array();
- foreach($versionArr as $index=>$value) {
- $queryArr[$index] = "SELECT internal_data_set_value('". $index ."', '". $value ."');";
- }
+ $sql = "UPDATE ". $this->config['DB_TABLE'] ." SET version_string='".
+ $this->gfObj->cleanString($versionInfo['version_string'], 'sql')
+ ."' WHERE project_name='".
+ $this->gfObj->cleanString($this->projectName, 'sql') ."'";
- $updateData = $versionArr;
- $sql = "UPDATE ". $this->config['DB_TABLE'] ." SET ".
- $this->gfObj->string_from_array($updateData, 'update', null, 'sql') ." WHERE " .
- "project_name='". $this->gfObj->cleanString($this->projectName, 'sql') ."'";
-
$updateRes = $this->db->run_update($sql,false);
if($updateRes == 1) {
$retval = $updateRes;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|