[CS-Project-svn_notify] SF.net SVN: cs-project: [853] trunk/1.2/lib/upgradeClass.php
Brought to you by:
crazedsanity
From: <cra...@us...> - 2008-03-27 02:50:19
|
Revision: 853 http://cs-project.svn.sourceforge.net/cs-project/?rev=853&view=rev Author: crazedsanity Date: 2008-03-26 19:50:15 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Use new constant for config file location, better error. Modified Paths: -------------- trunk/1.2/lib/upgradeClass.php Modified: trunk/1.2/lib/upgradeClass.php =================================================================== --- trunk/1.2/lib/upgradeClass.php 2008-03-27 02:49:13 UTC (rev 852) +++ trunk/1.2/lib/upgradeClass.php 2008-03-27 02:50:15 UTC (rev 853) @@ -68,7 +68,7 @@ if($this->upgrade_in_progress()) { throw new exception(__METHOD__ .": upgrade in progress"); } - elseif(!file_exists(dirname(__FILE__) .'/'. CONFIG_FILENAME)) { + elseif(!file_exists(CONFIG_FILE_LOCATION)) { throw new exception(__METHOD__ .": config.xml file missing"); } elseif(!file_exists(dirname(__FILE__) .'/../VERSION')) { @@ -147,7 +147,7 @@ $retval = NULL; if(!is_array($config) || !count($config)) { - throw new exception(__METHOD__ .": constant CONFIG_FILENAME not present, can't locate config xml file"); + throw new exception(__METHOD__ .": no configuration data available (missing config file?)"); } else { //now, let's see if there's a "version_string" index. @@ -203,7 +203,7 @@ $this->gfObj->debug_print(__METHOD__ .": result of setting 'upgrade in progress': (". $lockConfig .")"); //check to see if our config file is writable. - if(!$this->fsObj->is_writable("lib/config.xml")) { + if(!$this->fsObj->is_writable(CONFIG_FILE_LOCATION)) { throw new exception(__METHOD__ .": config file isn't writable!"); } @@ -625,7 +625,7 @@ //========================================================================= private function update_config_file($index, $value) { $gf = new cs_globalFunctions; - $myConfigFile = 'lib/'. CONFIG_FILENAME; + $myConfigFile = CONFIG_FILE_LOCATION; $fs = new cs_fileSystemClass(dirname(__FILE__) .'/../'); $xmlParser = new XMLParser($fs->read($myConfigFile)); $xmlCreator = new XMLCreator; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |