Rosanne DiMesio : Return 0 for empty wine-staging checkbox.
Jeremy Newman
jnewman at winehq.org
Wed Jun 7 12:59:33 CDT 2017
Module: appdb
Branch: master
Commit: 638563248caa9eef00f212f2a9eb9ab520d5b6ec
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=638563248caa9eef00f212f2a9eb9ab520d5b6ec
Author: Rosanne DiMesio <dimesio at earthlink.net>
Date: Wed Jun 7 11:53:17 2017 -0500
Return 0 for empty wine-staging checkbox.
Based on a patch by Jeremy Newman. Fixes bug 43145.
Signed-off-by: Rosanne DiMesio <dimesio at earthlink.net>
Signed-off-by: Jeremy Newman <jnewman at codeweavers.com>
---
include/testData.php | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/include/testData.php b/include/testData.php
index 6a375ba..61b23a0 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -970,10 +970,14 @@ class testData{
// Ask for confirmation if changing the tested Wine versions, becase we want users
// to submit new reports instead of updating existing ones when testing new Wines
$oOldTest = new testData($this->iTestingId);
- if($this->iTestingId && $oOldTest->sTestedRelease != getInput('sTestedRelease', $aValues) &&
- getInput('bConfirmTestedVersionChange', $aValues) != 'true'
- || $this->iTestingId && $oOldTest->iStaging != getInput('iStaging', $aValues) &&
- getInput('bConfirmTestedVersionChange', $aValues) != 'true')
+ if (
+ $this->iTestingId
+ && (getInput('bConfirmTestedVersionChange', $aValues) != 'true')
+ && (
+ $oOldTest->sTestedRelease != getInput('sTestedRelease', $aValues)
+ || $oOldTest->iStaging != intval(getInput('iStaging', $aValues))
+ )
+ )
{
$errors .= '<li>Are you sure you want to change the Wine version of the report? Please submit a new '.
'test report for every Wine version you test; this is useful for tracking Wine\'s progress. '.
@@ -1029,7 +1033,7 @@ class testData{
$this->sTestedDate = $aValues['sTestedDate'];
$this->iDistributionId = $aValues['iDistributionId'];
$this->sTestedRelease = $aValues['sTestedRelease'];
- $this->iStaging = $aValues['iStaging'];
+ $this->iStaging = intval($aValues['iStaging']);
$this->sInstalls = $aValues['sInstalls'];
$this->sRuns = $aValues['sRuns'];
$this->sTestedRating = $aValues['sTestedRating'];
More information about the wine-cvs
mailing list