ChangeSet ID: 30903 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/01/21 12:22:41
Modified files: include : version.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com Small fixes for license handling - Rename MakeLicenseList to makeLIcenseList - Print the selected argument once - Add optional parameter for matching selected license
Patch: http://cvs.winehq.org/patch.py?id=30903
Old revision New revision Changes Path 1.100 1.101 +8 -3 appdb/include/version.php
Index: appdb/include/version.php diff -u -p appdb/include/version.php:1.100 appdb/include/version.php:1.101 --- appdb/include/version.php:1.100 21 Jan 2007 18:22:41 -0000 +++ appdb/include/version.php 21 Jan 2007 18:22:41 -0000 @@ -609,7 +609,7 @@ class Version { // version license echo html_tr(array( array("<b>License</b>", "class="color0""), - $this->MakeLicenseList())); + $this->makeLicenseList()));
// version description echo '<tr valign=top><td class=color0><b>Version description</b></td>',"\n"; @@ -1083,8 +1083,11 @@ class Version { return $sResult; }
- function MakeLicenseList() + function makeLicenseList($sLicense = NULL) { + if(!$sLicense) + $sLicense = $this->sLicense; + $sReturn = "<select name="sLicense">\n"; $sReturn .= "<option value="">Choose . . .</option>\n"; $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREEWARE, @@ -1093,8 +1096,10 @@ class Version {
for($i = 0; $i < $iMax; $i++) { - if($aLicense[$i] == $this->sLicense) + if($aLicense[$i] == $sLicense) $sSelected = " selected="selected""; + else + $sSelected = "";
$sReturn .= "<option value="$aLicense[$i]"$sSelected>". "$aLicense[$i]</option>\n";