Rosanne DiMesio : Favor distributions selected from list over textboxes

Jeremy Newman jnewman at winehq.org
Wed Jul 12 10:44:58 CDT 2017


Module: appdb
Branch: master
Commit: c3635c89ab31de3a272aab97bda350d65f224837
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=c3635c89ab31de3a272aab97bda350d65f224837

Author: Rosanne DiMesio <dimesio at earthlink.net>
Date:   Wed Jul 12 10:07:59 2017 -0500

Favor distributions selected from list over textboxes

When a distribution has been selected from the dropdown list, anything
typed in the add distribution textboxes is a mistake. Also corrects a typo that prevented the notice that the user had added a new distribution from displaying fully.

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, 10 insertions(+), 4 deletions(-)

diff --git a/include/testData.php b/include/testData.php
index 051ef65..8dac819 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -814,7 +814,7 @@ class testData{
                                      "please add it using the form below.";
             } else
             {
-                $sDistributionHelp = "The user added a new distribution; ";
+                $sDistributionHelp = "The user added a new distribution; ".
                                      "review it in the form below or replace ".
                                      "it with one from the list.";
             }
@@ -825,7 +825,7 @@ class testData{
 
         echo '<td class=color0>',"\n";
         echo $sDistributionHelp;
-        distribution::make_distribution_list("iDistributionId", $this->iDistributionId);
+        distribution::make_distribution_list("iTestDistributionId", $this->iDistributionId);
         echo '</td></tr>',"\n";
 
         // Version List
@@ -927,7 +927,7 @@ class testData{
         }
 
         // No Distribution entered, and nothing in the list is selected
-        if (empty($aValues['sDistribution']) && !$aValues['iDistributionId'])
+        if (empty($aValues['sDistribution']) && !$aValues['iTestDistributionId'])
             $errors .= "<li>Please enter a distribution.</li>\n";
 
         if (empty($aValues['sInstalls']))
@@ -973,7 +973,13 @@ class testData{
         $this->shWhatDoesnt = $aValues['shWhatDoesnt'];
         $this->shWhatNotTested = $aValues['shWhatNotTested'];
         $this->sTestedDate = $aValues['sTestedDate'];
-        $this->iDistributionId = $aValues['iDistributionId'];
+        
+        //Favor distribution dropdown list selections over textboxes.
+        if($aValues['iTestDistributionId'])
+            $this->iDistributionId = $aValues['iTestDistributionId'];
+        else
+            $this->iDistributionId = $aValues['iDistributionId'];
+            
         $this->sTestedRelease = $aValues['sTestedRelease'];
         $this->iStaging = intval($aValues['iStaging']);
         $this->sInstalls = $aValues['sInstalls'];




More information about the wine-cvs mailing list