#!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Terry Weissman # David Gardiner use diagnostics; use strict; require "CGI.pl"; $::CheckOptionValues = 0; # It's OK if we have some bogus things in the # pop-up lists here, from a remembered query # that is no longer quite valid. We don't # want to crap out in the query page. # Shut up misguided -w warnings about "used only once": use vars @::CheckOptionValues, @::legal_resolution, @::legal_bug_status, @::legal_components, @::legal_keywords, @::legal_opsys, @::legal_platform, @::legal_priority, @::legal_product, @::legal_severity, @::legal_target_milestone, @::legal_versions, @::log_columns, %::versions, %::components, %::FORM; if (defined $::FORM{"GoAheadAndLogIn"}) { # We got here from a login page, probably from relogin.cgi. We better # make sure the password is legit. confirm_login(); } if (!defined $::COOKIE{"DEFAULTQUERY"}) { $::COOKIE{"DEFAULTQUERY"} = Param("defaultquery"); } if (!defined $::buffer || $::buffer eq "") { $::buffer = $::COOKIE{"DEFAULTQUERY"}; } use vars qw(%default); my %type; foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform", "priority", "bug_severity", "product", "reporter", "op_sys", "component", "version", "chfield", "chfieldfrom", "chfieldto", "chfieldvalue", "email1", "emailtype1", "emailreporter1", "emailassigned_to1", "emailcc1", "emailqa_contact1", "email2", "emailtype2", "emailreporter2", "emailassigned_to2", "emailcc2", "emailqa_contact2", "changedin", "votes", "short_desc", "short_desc_type", "long_desc", "long_desc_type", "bug_file_loc", "bug_file_loc_type", "status_whiteboard", "status_whiteboard_type", "keywords") { $default{$name} = ""; $type{$name} = 0; } foreach my $item (split(/\&/, $::buffer)) { my @el = split(/=/, $item); my $name = $el[0]; my $value; if ($#el > 0) { $value = url_decode($el[1]); } else { $value = ""; } if (defined $default{$name}) { if ($default{$name} ne "") { $default{$name} .= "|$value"; $type{$name} = 1; } else { $default{$name} = $value; } } } if ($default{'chfieldto'} eq "") { $default{'chfieldto'} = "Now"; } my $namelist = ""; foreach my $i (sort (keys %::COOKIE)) { if ($i =~ /^QUERY_/) { if ($::COOKIE{$i} ne "") { my $name = substr($i, 6); $namelist .= "