Alexander Nicolaysen Sørnes : testData: Fix moving of test results
Chris Morgan
cmorgan at winehq.org
Fri Apr 11 14:18:59 CDT 2008
Module: appdb
Branch: master
Commit: 498a2bd4b03e7d1327570660110dea2f676a36a3
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=498a2bd4b03e7d1327570660110dea2f676a36a3
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Sun Mar 2 23:19:28 2008 +0100
testData: Fix moving of test results
---
include/testData.php | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/testData.php b/include/testData.php
index 6556896..ed24ead 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -190,12 +190,7 @@ class testData{
if($oNewVersion->objectGetState() == 'accepted' && $this->sState == 'pending')
$this->sState = 'queued';
- if($this->sState == 'accepted')
- {
- $oOldVersion = new version($oOldTest->iVersionId);
- $oOldVersion->updateRatingInfo();
- $oNewVersion->updateRatingInfo();
- }
+ $bUpdateRatingInfo = true;
}
if(query_parameters("UPDATE testResults SET
@@ -227,7 +222,14 @@ class testData{
$this->iTestingId))
{
if($bUpdateRatingInfo && $this->sState == 'accepted')
+ {
+ if($this->iVersionId != $oOldTest->iVersionId)
+ {
+ $oNewVersion = new version($this->iVersionId);
+ $oNewVersion->updateRatingInfo();
+ }
$oVersion->updateRatingInfo();
+ }
if(!$bSilent)
$this->SendNotificationMail("edit", $sWhatChanged);
More information about the wine-cvs
mailing list