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