From f0b02e580e71b4a347522a27415bef4bdccdb721 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 11 May 2005 00:58:58 +0000 Subject: [PATCH] Don't display the previous release or description in the change output if they are empty strings. This just makes the change output more confusing. --- include/version.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/version.php b/include/version.php index bf44e3f..00b5508 100644 --- a/include/version.php +++ b/include/version.php @@ -171,7 +171,12 @@ class Version { $sUpdate = compile_update_string(array('description' => $sDescription)); if (!query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId)) return false; - $sWhatChanged .= "Description was changed from\n ".$this->sDescription."\n to \n".$sDescription.".\n\n"; + + if($this->sDescription != "") + $sWhatChanged .= "Description was changed from\n ".$this->sDescription."\n to \n".$sDescription.".\n\n"; + else + $sWhatChanged .= "Description was changed to \n".$sDescription.".\n\n"; + $this->sDescription = $sDescription; } @@ -180,7 +185,12 @@ class Version { $sUpdate = compile_update_string(array('maintainer_release' => $sTestedRelease)); if (!query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId)) return false; - $sWhatChanged .= "Last tested release was changed from ".$this->sTestedRelease." to ".$sTestedRelease.".\n\n"; + + if($this->sTestedRelease != "") + $sWhatChanged .= "Last tested release was changed from ".$this->sTestedRelease." to ".$sTestedRelease.".\n\n"; + else + $sWhatChanged .= "Last tested release was changed to ".$sTestedRelease.".\n\n"; + $this->sTestedRelease = $sTestedRelease; }