From 4586465b093c6e3b7feb780b3f5dbb8a46ad7ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Mon, 27 Nov 2006 02:32:22 +0000 Subject: [PATCH] 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. --- include/testData.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/testData.php b/include/testData.php index e37c90b..7cade6e 100644 --- a/include/testData.php +++ b/include/testData.php @@ -582,7 +582,15 @@ class testData{ if (empty($aValues['sTestedRating'])) $errors .= "
  • Please enter a rating based on how well this application runs.
  • \n"; - + + // Basic checking of rating logic to ensure that the users test results + // are consistent + if (($aValues['sRuns'] != "Yes") && ($aValues['sTestedRating'] != GARBAGE_RATING)) + $errors .= "
  • Applications that do not run should be rated ‘Garbage’.
  • \n"; + + if (($aValues['sInstalls'] == "No") && ($aValues['sTestedRating'] == PLATINUM_RATING)) + $errors .= "
  • An application can only get a Platinum rating if it installs and runs ‘out of the box’.
  • \n"; + return $errors; }