Allow selecting stable Wine versions even if they are old
This commit is contained in:
committed by
Alexander Nicolaysen Sørnes
parent
301ad3cd1a
commit
591cf938b5
@@ -33,6 +33,10 @@ define("BUGZILLA_ROOT","http://bugs.winehq.org/"); // path to bugzilla
|
||||
// How old (days) a test report has to before it is judged to be aged
|
||||
define("TESTDATA_AGED_THRESHOLD", 175);
|
||||
|
||||
// Show versions from these branches even if they are not among the most recent ones
|
||||
// Separate by commas if there are more than one
|
||||
define("STABLE_BRANCHES", "1.0."););
|
||||
|
||||
/*
|
||||
* apps database info
|
||||
*/
|
||||
|
||||
@@ -169,16 +169,27 @@ function get_bugzilla_versions()
|
||||
{
|
||||
$aVersions = array();
|
||||
$sTable = BUGZILLA_DB.".versions";
|
||||
$sWhere = "WHERE product_id=".BUGZILLA_PRODUCT_ID;
|
||||
$sQuery = "SELECT value FROM $sTable $sWhere ORDER BY id desc limit 6";
|
||||
|
||||
$hResult = query_bugzilladb($sQuery);
|
||||
if(!$hResult) return $aVersions; // empty
|
||||
// The empty string will fetch the most recent versions
|
||||
$aBranches = array('');
|
||||
|
||||
// build the list of versions
|
||||
while(list($sValue) = query_fetch_row($hResult))
|
||||
// Get a list of stable branches
|
||||
if(STABLE_BRANCHES)
|
||||
$aBranches = array_merge($aBranches, explode(',', STABLE_BRANCHES));
|
||||
|
||||
foreach($aBranches as $sBranch)
|
||||
{
|
||||
$aVersions[] = $sValue;
|
||||
$sWhere = "WHERE product_id =".BUGZILLA_PRODUCT_ID." AND value LIKE '$sBranch%'";
|
||||
$sQuery = "SELECT value FROM $sTable $sWhere ORDER BY id desc limit 6";
|
||||
$hResult = query_bugzilladb($sQuery);
|
||||
if($hResult)
|
||||
{
|
||||
while(list($sValue) = query_fetch_row($hResult))
|
||||
{
|
||||
if(!in_array($sValue, $aVersions))
|
||||
$aVersions[] = $sValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $aVersions;
|
||||
|
||||
Reference in New Issue
Block a user