[CS-Project-svn_notify] SF.net SVN: cs-project: [815] trunk/1.2/lib/upgradeClass.php
Brought to you by:
crazedsanity
From: <cra...@us...> - 2008-02-09 04:22:43
|
Revision: 815 http://cs-project.svn.sourceforge.net/cs-project/?rev=815&view=rev Author: crazedsanity Date: 2008-02-08 20:22:41 -0800 (Fri, 08 Feb 2008) Log Message: ----------- Check for invalid entry in upgrade.xml (which I had previously added). Modified Paths: -------------- trunk/1.2/lib/upgradeClass.php Modified: trunk/1.2/lib/upgradeClass.php =================================================================== --- trunk/1.2/lib/upgradeClass.php 2008-02-09 03:59:16 UTC (rev 814) +++ trunk/1.2/lib/upgradeClass.php 2008-02-09 04:22:41 UTC (rev 815) @@ -190,7 +190,7 @@ throw new exception(__METHOD__ .": upgrade already in progress...????"); } else { - $lockConfig = $this->upgrade_in_progress(TRUE); + $lockConfig = $this->upgrade_in_progress(); $this->fsObj->cd("/"); //TODO: not only should the "create_file()" method be run, but also do a sanity check by calling lock_file_exists(). @@ -819,7 +819,10 @@ foreach($this->config['MATCHING'] as $matchVersion=>$data) { $matchVersion = preg_replace('/^V/', '', $matchVersion); - if($this->databaseVersion == $matchVersion || $this->is_higher_version($this->databaseVersion, $matchVersion)) { + if($matchVersion == $data['TARGET_VERSION']) { + throw new exception(__METHOD__ .": detected invalid TARGET_VERSION in (". $matchVersion ."): make sure TARGET_VERSION is higher than matching!"); + } + elseif($this->databaseVersion == $matchVersion || $this->is_higher_version($this->databaseVersion, $matchVersion)) { //the version in MATCHING is equal to or HIGHER than our database version... make sure it is NOT // higher than the version in our versionFile. if(!$this->is_higher_version($this->versionFileVersion, $matchVersion)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |