#!/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.0 (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 use diagnostics; use strict; require "CGI.pl"; # Shut up misguided -w warnings about "used only once": use vars @::legal_resolution, @::legal_product, @::legal_bug_status, @::legal_priority, @::legal_resolution, @::legal_opsys, @::legal_platform, @::legal_components, @::legal_versions, @::legal_severity, @::legal_target_milestone, %::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"}; } my %default; my %type; foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform", "priority", "bug_severity", "product", "reporter", "op_sys", "component", "version", "email1", "emailtype1", "emailreporter1", "emailassigned_to1", "emailcc1", "emailqa_contact1", "email2", "emailtype2", "emailreporter2", "emailassigned_to2", "emailcc2", "emailqa_contact2") { $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; } } } my $namelist = ""; foreach my $i (sort (keys %::COOKIE)) { if ($i =~ /^QUERY_/) { if ($::COOKIE{$i} ne "") { my $name = substr($i, 6); $namelist .= "