Closed Bug 238866 Opened 20 years ago Closed 19 years ago

remove %FORM from query.cgi

Categories

(Bugzilla :: Bugzilla-General, enhancement, P2)

2.17.7
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: justdave, Assigned: wicked)

References

Details

Attachments

(1 file)

This should be another easy one

49:    %FORM
56:if (defined $::FORM{"GoAheadAndLogIn"}) {
101:if ($::FORM{'nukedefaultquery'}) {
332:foreach my $cmd (grep(/^cmd-/, keys(%::FORM))) {
334:        $::FORM{"field$1-$2-$3"} = "xyzzy";
338:if (!exists $::FORM{'field0-0-0'}) {
339:    $::FORM{'field0-0-0'} = "xyzzy";
346:for (my $chart = 0; $::FORM{"field$chart-0-0"}; $chart++) {
348:    for (my $row = 0; $::FORM{"field$chart-$row-0"}; $row++) {
350:        for (my $col = 0; $::FORM{"field$chart-$row-$col"}; $col++) {
351:            push(@cols, { field => $::FORM{"field$chart-$row-$col"},
352:                          type => $::FORM{"type$chart-$row-$col"},
353:                          value => $::FORM{"value$chart-$row-$col"} });
384:if ($::FORM{'order'}) { $deforder = $::FORM{'order'} }
390:if (($::FORM{'query_format'} || $::FORM{'format'} || "") eq "create-series") {
398:$vars->{'format'} = $::FORM{'format'};
399:$vars->{'query_format'} = $::FORM{'query_format'};
406:                       $::FORM{'query_format'} || $::FORM{'format'}, 
407:                       $::FORM{'ctype'});

72:    foreach my $i (keys %::COOKIE) {
74:            push(@oldquerycookies, [$1, $i, $::COOKIE{$i}]);
77:    if (defined $::COOKIE{'DEFAULTQUERY'}) {
79:                                $::COOKIE{'DEFAULTQUERY'}]);
379:if ($::COOKIE{'LASTORDER'}) {
Blocks: 236678
No longer blocks: 225818
Ugh. This one does some evil assignments.
COOKIE done in bug 252379.
Blocks: 225818
No longer blocks: 236678
Summary: remove %FORM and %COOKIE from query.cgi → remove %FORM from query.cgi
Shane, did you want to take a stab at this one?
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.20
If you don't mind, I'll take this one.
Assignee: nobody → wicked
Attached patch Remove FORMs, V1Splinter Review
Here is the first attempt for review. I tested login, nuking default query,
different query formats/ctypes, boolean chart manipulation and creating new
series succesfully.
Attachment #176329 - Flags: review?
Comment on attachment 176329 [details] [diff] [review]
Remove FORMs, V1

>@@ -455,7 +455,7 @@
> # format.
> my $format = GetFormat("search/search", 
>                        $vars->{'query_format'} || $vars->{'format'}, 
>-                       $cgi->param('ctype'));
>+                       scalar $cgi->param('ctype'));

Not sure what's going on here. Other than that, r=gerv.

Gerv
Attachment #176329 - Flags: review? → review+
(In reply to comment #6)
Oh, it was already using cgi. I wonder if it worked before then.. That scalar
was needed before in similar cases so that the cgi->param returns the param in
scalar context (undef) instead of a list context (empty list) if there was no
such param. See https://bugzilla.mozilla.org/show_bug.cgi?id=225818#c0.
Flags: approval?
Flags: approval? → approval+
Severity: normal → enhancement
Status: NEW → ASSIGNED
Checking in query.cgi;
/cvsroot/mozilla/webtools/bugzilla/query.cgi,v  <--  query.cgi
new revision: 1.142; previous revision: 1.141
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: