Remove "CVS" version from the array of Wine versions we present to the user. It was a dumb idea

to have a CVS version anyway since all CVS versions appear the same.
This commit is contained in:
Chris Morgan
2007-06-11 00:25:50 +00:00
committed by WineHQ
parent 19cae27ff8
commit c8b0ff974a

View File

@@ -168,29 +168,28 @@ function make_bugzilla_version_list($varname, $cvalue)
// and we can't use 'order by' since we have no column
// to order by, but the entries should come out in the
// order they were added
// - Trim the list, we don't want every version of wine ever released
// - Add 'CVS' explicitly since we trim it out
// - Trim the list, we don't want every version of wine ever released and
// we don't want the "CVS" version included since we can never figure out
// what version of Wine any given "CVS" version is
//
// TODO: if we ever get a reasonable way to order the list replace this code
// with that
$aVersions = array();
while(list($value) = mysql_fetch_row($hResult))
while(list($sValue) = mysql_fetch_row($hResult))
{
// exclude unspecified versions
if($value != "unspecified")
$aVersions[] = $value;
// exclude unspecified versions and the "CVS" version
if(($sValue != "unspecified") && ($sValue != "CVS"))
$aVersions[] = $sValue;
}
// now reverse the array order
// now reverse the array order since the oldest
// versions were added first
$aVersions = array_reverse($aVersions);
// now trim off all but the last X versions
$iVersionsToKeep = 6;
$aVersions = array_slice($aVersions, 0, $iVersionsToKeep);
// explicitly add 'CVS' since we are eliminating that above
$aVersions[] = "CVS";
// DONE TRIMMING VERSIONS
/////////////////////////