diff options
author | bbaetz%student.usyd.edu.au <> | 2002-11-19 08:49:18 +0100 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-11-19 08:49:18 +0100 |
commit | ea9345d65c7e2770cad1f5890ad6a99b1acc4022 (patch) | |
tree | 638398d929088e8b2aa89d83734017884447d5d5 /enter_bug.cgi | |
parent | f45790a70fbe66f2354e230591fe07f0b7ee9626 (diff) | |
download | bugzilla-ea9345d65c7e2770cad1f5890ad6a99b1acc4022.tar.gz bugzilla-ea9345d65c7e2770cad1f5890ad6a99b1acc4022.tar.xz |
Bug 179206 - enter_bug isn't picking up version from URL
patch by GavinS <bugzilla@chimpychompy.org>, r=bbaetz
a=justdave
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-x | enter_bug.cgi | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi index 22c016bba..5492bb14a 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -281,15 +281,18 @@ $default{'rep_platform'} = pickplatform(); $vars->{'op_sys'} = \@legal_opsys; $default{'op_sys'} = pickos(); -# Posting a bug sets a cookie for the current version, if one exists. Else, -# the default version is the last one in the list (hopefully the latest one). -# Eventually maybe each product should have a "current version" parameter. +# Use the version specified in the URL, if one is supplied. If not, +# then use the cookie-specified value. (Posting a bug sets a cookie +# 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} || []; -if (exists $::COOKIE{"VERSION-$product"} && +if (formvalue('version')) { + $default{'version'} = formvalue('version'); +} elsif (exists $::COOKIE{"VERSION-$product"} && lsearch($vars->{'version'}, $::COOKIE{"VERSION-$product"}) != -1) { $default{'version'} = $::COOKIE{"VERSION-$product"}; -} elsif (formvalue('version')) { - $default{'version'} = formvalue('version'); } else { $default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}]; } |