Alexander Nicolaysen Sørnes : Update version rating when updating test results
Chris Morgan
cmorgan at winehq.org
Wed Jan 2 20:51:44 CST 2008
Module: appdb
Branch: master
Commit: e8bfc0024cb6b491e85ec83b845e34fcc44fb40c
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=e8bfc0024cb6b491e85ec83b845e34fcc44fb40c
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Tue Dec 25 20:01:00 2007 +0100
Update version rating when updating test results
---
include/testData.php | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/testData.php b/include/testData.php
index 9b8a968..096ae65 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -92,6 +92,9 @@ class testData{
$this->iTestingId = query_appdb_insert_id();
$this->testData($this->iTestingId);
$this->SendNotificationMail();
+
+ if(!$this->sState == 'accepted')
+ $oVersion->updateRatingInfo();
return true;
}
else
@@ -165,24 +168,36 @@ class testData{
"$this->sRuns.\n";
}
+ $bUpdateRatingInfo = false;
if($this->sTestedRating != $oOldTest->sTestedRating)
{
+ $bUpdateRatingInfo = true;
$sWhatChanged .= "Rating was changed from $oOldTest->sTestedRating ".
"to $this->sTestedRating.\n";
}
if($this->sTestedRelease != $oOldTest->sTestedRelease)
{
+ $bUpdateRatingInfo = true;
$sWhatChanged .= "Tested release was changed from ".
$oOldTest->sTestedRelease." to $this->sTestedRelease.\n";
}
+ if($bUpdateRatingInfo && $this->sState == 'accepted')
+ $oVersion->updateRatingInfo();
+
if($this->iVersionId != $oOldTest->iVersionId)
{
$sWhatChanged .= 'Moved from '.version::fullName($oOldTest->iVersionId).' to '.version::fullName($this->iVersionId)."\n";
$oNewVersion = new version($this->iVersionId);
if($oNewVersion->objectGetState() == 'accepted' && $this->sState == 'pending')
$this->sState = 'queued';
+
+ if($this->sState == 'accepted')
+ {
+ $oOldVersion->updateRatingInfo();
+ $oNewVersion->updateRatingInfo();
+ }
}
if(query_parameters("UPDATE testResults SET
@@ -268,6 +283,9 @@ class testData{
return false;
}
+ if($this->sState == 'accepted')
+ $oVersion->updateRatingInfo();
+
return true;
}
@@ -299,6 +317,8 @@ class testData{
return false;
}
+ $oVersion->updateRatingInfo();
+
return true;
}
More information about the wine-cvs
mailing list