Module: appdb Branch: master Commit: 638563248caa9eef00f212f2a9eb9ab520d5b6ec URL: http://source.winehq.org/git/appdb.git/?a=commit;h=638563248caa9eef00f212f2a...
Author: Rosanne DiMesio dimesio@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@earthlink.net Signed-off-by: Jeremy Newman jnewman@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'];