Bug 179206 - enter_bug isn't picking up version from URL

patch by GavinS <bugzilla@chimpychompy.org>, r=bbaetz
a=justdave
This commit is contained in:
bbaetz%student.usyd.edu.au 2002-11-18 23:49:18 +00:00
Родитель 373f2df04e
Коммит 802baaf5d0
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -281,15 +281,18 @@ $default{'rep_platform'} = pickplatform();
$vars->{'op_sys'} = \@legal_opsys; $vars->{'op_sys'} = \@legal_opsys;
$default{'op_sys'} = pickos(); $default{'op_sys'} = pickos();
# Posting a bug sets a cookie for the current version, if one exists. Else, # Use the version specified in the URL, if one is supplied. If not,
# the default version is the last one in the list (hopefully the latest one). # then use the cookie-specified value. (Posting a bug sets a cookie
# Eventually maybe each product should have a "current version" parameter. # for the current version.) If no URL or cookie version, the default
# version is the last one in the list (hopefully the latest one).
# Eventually maybe each product should have a "current version"
# parameter.
$vars->{'version'} = $::versions{$product} || []; $vars->{'version'} = $::versions{$product} || [];
if (exists $::COOKIE{"VERSION-$product"} && if (formvalue('version')) {
$default{'version'} = formvalue('version');
} elsif (exists $::COOKIE{"VERSION-$product"} &&
lsearch($vars->{'version'}, $::COOKIE{"VERSION-$product"}) != -1) { lsearch($vars->{'version'}, $::COOKIE{"VERSION-$product"}) != -1) {
$default{'version'} = $::COOKIE{"VERSION-$product"}; $default{'version'} = $::COOKIE{"VERSION-$product"};
} elsif (formvalue('version')) {
$default{'version'} = formvalue('version');
} else { } else {
$default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}]; $default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}];
} }