ChangeSet ID: 31358 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/09/07 20:48:53
Modified files: include : testData.php util.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com make_maintainer_rating_list() should return a string containing the html for the list. Update users of make_maintainer_rating_list() to echo its return value.
Patch: http://cvs.winehq.org/patch.py?id=31358
Old revision New revision Changes Path 1.77 1.78 +1 -1 appdb/include/testData.php 1.104 1.105 +8 -6 appdb/include/util.php
Index: appdb/include/testData.php diff -u -p appdb/include/testData.php:1.77 appdb/include/testData.php:1.78 --- appdb/include/testData.php:1.77 8 Sep 2007 1:48:53 -0000 +++ appdb/include/testData.php 8 Sep 2007 1:48:53 -0000 @@ -677,7 +677,7 @@ class testData{ echo '</td></tr>',"\n"; // Rating echo '<tr><td class="color0"><b>Rating</b></td><td class="color0">',"\n"; - make_maintainer_rating_list("sTestedRating", $this->sTestedRating); + echo make_maintainer_rating_list("sTestedRating", $this->sTestedRating); echo '<a href="'.BASE.'/help/?sTopic=maintainer_ratings" target="_blank">Rating definitions</a></td></tr>',"\n"; // extra comments echo '<tr valign=top><td class="color1"><b>Extra comments</b></td>',"\n"; Index: appdb/include/util.php diff -u -p appdb/include/util.php:1.104 appdb/include/util.php:1.105 --- appdb/include/util.php:1.104 8 Sep 2007 1:48:53 -0000 +++ appdb/include/util.php 8 Sep 2007 1:48:53 -0000 @@ -200,22 +200,24 @@ function make_bugzilla_version_list($sVa return $sStr; }
+// returns a string containing the html for the maintainer rating list function make_maintainer_rating_list($varname, $cvalue) { - - echo "<select name='$varname'>\n"; - echo "<option value="">Choose ...</option>\n"; + $sTxt = "<select name='$varname'>\n"; + $sTxt .= "<option value="">Choose ...</option>\n"; $aRating = array("Platinum", "Gold", "Silver", "Bronze", "Garbage"); $iMax = count($aRating);
for($i=0; $i < $iMax; $i++) { if($aRating[$i] == $cvalue) - echo "<option class=$aRating[$i] value=$aRating[$i] selected>$aRating[$i]\n"; + $sTxt .= "<option class=$aRating[$i] value=$aRating[$i] selected>$aRating[$i]\n"; else - echo "<option class=$aRating[$i] value=$aRating[$i]>$aRating[$i]\n"; + $sTxt .= "<option class=$aRating[$i] value=$aRating[$i]>$aRating[$i]\n"; } - echo "</select>\n"; + $sTxt .= "</select>\n"; + + return $sTxt; }
/* Get the number of users in the database */