[PATCH appdb] Disable staging checkbox for new test reports

Rosanne DiMesio dimesio at earthlink.net
Mon Feb 19 11:35:36 CST 2018


Prevents users from submitting new test reports for nonexistant staging versions.
Current data is retained and the checkbox is still active for existing reports
in case they need to be edited by an admin or maintainer. This change can
be easily reverted if the branch is officially revived by WineHQ.

Signed-off-by: Rosanne DiMesio <dimesio at earthlink.net>
---
 include/testData.php | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/testData.php b/include/testData.php
index 1083cfb..cec7fec 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -921,11 +921,14 @@ class testData{
         echo "<span>Version not listed?  Your Wine is too old, <a href=\"//winehq.org/download\">upgrade!</a></span><br>";
         // Checkbox for Wine-staging
         echo '<label class="btn btn-secondary">';
-        if($this->iStaging != 0)
-            echo '<input type="checkbox" name="iStaging" value="1" checked>';  
+        if($this->sState != 'accepted')
+            echo '<input type="checkbox" name="iStaging" value="1" disabled>';
         else
-           echo '<input type="checkbox" name="iStaging" value="1">';
-        echo '  Wine-staging';
+            if($this->iStaging != 0)
+                echo '<input type="checkbox" name="iStaging" value="1" checked>';  
+            else
+                echo '<input type="checkbox" name="iStaging" value="1">';
+        echo '  Wine-staging <i>(discontinued; last official release was 2.21)</i>';
         echo '</label>';
         echo '</td></tr>',"\n";
        
-- 
2.12.3




More information about the wine-devel mailing list