Add basic rating logic checking to testData::CheckOutputEditorInput() to prevent people from saying a running application is

garbage and an application that won't install is platinum.
This commit is contained in:
Alexander Nicolaysen Sørnes
2006-11-27 02:32:22 +00:00
committed by WineHQ
parent ddcb2691a7
commit 4586465b09

View File

@@ -583,6 +583,14 @@ class testData{
if (empty($aValues['sTestedRating']))
$errors .= "<li>Please enter a rating based on how well this application runs.</li>\n";
// Basic checking of rating logic to ensure that the users test results
// are consistent
if (($aValues['sRuns'] != "Yes") && ($aValues['sTestedRating'] != GARBAGE_RATING))
$errors .= "<li>Applications that do not run should be rated &#8216;Garbage&#8217;.</li>\n";
if (($aValues['sInstalls'] == "No") && ($aValues['sTestedRating'] == PLATINUM_RATING))
$errors .= "<li>An application can only get a Platinum rating if it installs and runs &#8216;out of the box&#8217;.</li>\n";
return $errors;
}