mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 301508: Remove CGI.pl - Patch by Fr�d�ric Buclin <LpSolit@gmail.com> r=mkanat,wicked a=justdave
This commit is contained in:
parent
870f2dd908
commit
a8d486f572
@ -28,8 +28,8 @@ use strict;
|
||||
|
||||
package Bugzilla::Attachment;
|
||||
|
||||
# This module requires that its caller have said "require CGI.pl" to import
|
||||
# relevant functions from that script and its companion globals.pl.
|
||||
# This module requires that its caller have said "require globals.pl" to import
|
||||
# relevant functions from that script.
|
||||
|
||||
# Use the Flag module to handle flags.
|
||||
use Bugzilla::Flag;
|
||||
|
@ -37,12 +37,11 @@ See below for more information.
|
||||
=item *
|
||||
|
||||
Prior to calling routines in this module, it's assumed that you have
|
||||
already done a C<require CGI.pl>. This will eventually change in a
|
||||
future version when CGI.pl is removed.
|
||||
already done a C<require globals.pl>.
|
||||
|
||||
=item *
|
||||
|
||||
Import relevant functions from that script and its companion globals.pl.
|
||||
Import relevant functions from that script.
|
||||
|
||||
=item *
|
||||
|
||||
|
@ -35,8 +35,7 @@ See below for more information.
|
||||
=item *
|
||||
|
||||
Prior to calling routines in this module, it's assumed that you have
|
||||
already done a C<require CGI.pl>. This will eventually change in a
|
||||
future version when CGI.pl is removed.
|
||||
already done a C<require globals.pl>.
|
||||
|
||||
=item *
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
use strict;
|
||||
|
||||
# The caller MUST require CGI.pl and globals.pl before using this
|
||||
# The caller MUST require globals.pl before using this module.
|
||||
|
||||
use vars qw($userid);
|
||||
|
||||
|
@ -37,8 +37,8 @@ use Bugzilla::Util;
|
||||
use Date::Format;
|
||||
use Date::Parse;
|
||||
|
||||
# This module requires that its caller have said "require CGI.pl" to import
|
||||
# relevant functions from that script and its companion globals.pl.
|
||||
# This module requires that its caller have said "require globals.pl" to import
|
||||
# relevant functions from that script.
|
||||
|
||||
################################################################################
|
||||
# Constants
|
||||
|
@ -1,67 +0,0 @@
|
||||
# -*- 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 <terry@mozilla.org>
|
||||
# Dan Mosedale <dmose@mozilla.org>
|
||||
# Joe Robins <jmrobins@tgix.com>
|
||||
# Dave Miller <justdave@syndicomm.com>
|
||||
# Christopher Aillon <christopher@aillon.com>
|
||||
# Gervase Markham <gerv@gerv.net>
|
||||
# Christian Reis <kiko@async.com.br>
|
||||
|
||||
# Contains some global routines used throughout the CGI scripts of Bugzilla.
|
||||
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
# use Carp; # for confess
|
||||
|
||||
use Bugzilla::Util;
|
||||
use Bugzilla::Config;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Error;
|
||||
use Bugzilla::BugMail;
|
||||
use Bugzilla::Bug;
|
||||
use Bugzilla::User;
|
||||
|
||||
# Shut up misguided -w warnings about "used only once". For some reason,
|
||||
# "use vars" chokes on me when I try it here.
|
||||
|
||||
sub CGI_pl_sillyness {
|
||||
my $zz;
|
||||
$zz = $::buffer;
|
||||
}
|
||||
|
||||
require 'globals.pl';
|
||||
|
||||
use vars qw($vars);
|
||||
|
||||
############# Live code below here (that is, not subroutine defs) #############
|
||||
|
||||
use Bugzilla;
|
||||
|
||||
# XXX - mod_perl - reset this between runs
|
||||
$::cgi = Bugzilla->cgi;
|
||||
|
||||
$::buffer = $::cgi->query_string();
|
||||
|
||||
# This could be needed in any CGI, so we set it here.
|
||||
$vars->{'help'} = $::cgi->param('help') ? 1 : 0;
|
||||
|
||||
1;
|
@ -35,13 +35,10 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
use vars qw(
|
||||
$template
|
||||
$vars
|
||||
);
|
||||
use vars qw($template $vars);
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla::Config qw(:locations);
|
||||
|
||||
# Use these modules to handle flags.
|
||||
@ -135,7 +132,7 @@ sub validateID
|
||||
# Happens when calling plain attachment.cgi from the urlbar directly
|
||||
if ($param eq 'id' && !$cgi->param('id')) {
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
$template->process("attachment/choose.html.tmpl", $vars) ||
|
||||
ThrowTemplateError($template->error());
|
||||
exit;
|
||||
@ -512,9 +509,9 @@ sub view
|
||||
$filename =~ s/\\/\\\\/g; # escape backslashes
|
||||
$filename =~ s/"/\\"/g; # escape quotes
|
||||
|
||||
print Bugzilla->cgi->header(-type=>"$contenttype; name=\"$filename\"",
|
||||
-content_disposition=> "inline; filename=\"$filename\"",
|
||||
-content_length => $filesize);
|
||||
print $cgi->header(-type=>"$contenttype; name=\"$filename\"",
|
||||
-content_disposition=> "inline; filename=\"$filename\"",
|
||||
-content_length => $filesize);
|
||||
|
||||
if ($thedata) {
|
||||
print $thedata;
|
||||
@ -746,7 +743,6 @@ sub diff
|
||||
require PatchReader::DiffPrinter::raw;
|
||||
$last_reader->sends_data_to(new PatchReader::DiffPrinter::raw());
|
||||
# Actually print out the patch
|
||||
use vars qw($cgi);
|
||||
print $cgi->header(-type => 'text/plain',
|
||||
-expires => '+3M');
|
||||
$reader->iterate_string("Attachment $attach_id", $thedata);
|
||||
@ -830,7 +826,7 @@ sub viewall
|
||||
$vars->{'bugsummary'} = $bugsummary;
|
||||
$vars->{'GetBugLink'} = \&GetBugLink;
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/show-multiple.html.tmpl", $vars)
|
||||
@ -887,7 +883,7 @@ sub enter
|
||||
$vars->{'any_flags_requesteeble'} = grep($_->{'is_requesteeble'},
|
||||
@$flag_types);
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/create.html.tmpl", $vars)
|
||||
@ -1070,7 +1066,7 @@ sub insert
|
||||
$vars->{'contenttypemethod'} = $cgi->param('contenttypemethod');
|
||||
$vars->{'contenttype'} = $cgi->param('contenttype');
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/created.html.tmpl", $vars)
|
||||
@ -1135,7 +1131,7 @@ sub edit
|
||||
require PatchReader;
|
||||
$vars->{'patchviewerinstalled'} = 1;
|
||||
};
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/edit.html.tmpl", $vars)
|
||||
@ -1290,7 +1286,7 @@ sub update
|
||||
$vars->{'attachid'} = $attach_id;
|
||||
$vars->{'bugid'} = $bugid;
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$template->process("attachment/updated.html.tmpl", $vars)
|
||||
|
@ -42,7 +42,7 @@ use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw($db_name
|
||||
@components
|
||||
@ -58,8 +58,9 @@ use vars qw($db_name
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my $buffer = $cgi->query_string();
|
||||
|
||||
if (length($::buffer) == 0) {
|
||||
if (length($buffer) == 0) {
|
||||
print $cgi->header(-refresh=> '10; URL=query.cgi');
|
||||
ThrowUserError("buglist_parameters_required");
|
||||
}
|
||||
@ -146,8 +147,8 @@ if (defined $cgi->param('regetlastlist')) {
|
||||
});
|
||||
}
|
||||
|
||||
if ($::buffer =~ /&cmd-/) {
|
||||
my $url = "query.cgi?$::buffer#chart";
|
||||
if ($buffer =~ /&cmd-/) {
|
||||
my $url = "query.cgi?$buffer#chart";
|
||||
print $cgi->redirect(-location => $url);
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
$vars->{'message'} = "buglist_adding_field";
|
||||
@ -361,18 +362,18 @@ if ($cgi->param('cmdtype') eq "dorem" && $cgi->param('remaction') =~ /^run/) {
|
||||
# Take appropriate action based on user's request.
|
||||
if ($cgi->param('cmdtype') eq "dorem") {
|
||||
if ($cgi->param('remaction') eq "run") {
|
||||
$::buffer = LookupNamedQuery(scalar $cgi->param("namedcmd"));
|
||||
$buffer = LookupNamedQuery(scalar $cgi->param("namedcmd"));
|
||||
$vars->{'searchname'} = $cgi->param('namedcmd');
|
||||
$vars->{'searchtype'} = "saved";
|
||||
$params = new Bugzilla::CGI($::buffer);
|
||||
$params = new Bugzilla::CGI($buffer);
|
||||
$order = $params->param('order') || $order;
|
||||
|
||||
}
|
||||
elsif ($cgi->param('remaction') eq "runseries") {
|
||||
$::buffer = LookupSeries(scalar $cgi->param("series_id"));
|
||||
$buffer = LookupSeries(scalar $cgi->param("series_id"));
|
||||
$vars->{'searchname'} = $cgi->param('namedcmd');
|
||||
$vars->{'searchtype'} = "series";
|
||||
$params = new Bugzilla::CGI($::buffer);
|
||||
$params = new Bugzilla::CGI($buffer);
|
||||
$order = $params->param('order') || $order;
|
||||
}
|
||||
elsif ($cgi->param('remaction') eq "forget") {
|
||||
@ -402,7 +403,7 @@ if ($cgi->param('cmdtype') eq "dorem") {
|
||||
elsif (($cgi->param('cmdtype') eq "doit") && defined $cgi->param('remtype')) {
|
||||
if ($cgi->param('remtype') eq "asdefault") {
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
InsertNamedQuery(Bugzilla->user->id, DEFAULT_QUERY_NAME, $::buffer);
|
||||
InsertNamedQuery(Bugzilla->user->id, DEFAULT_QUERY_NAME, $buffer);
|
||||
$vars->{'message'} = "buglist_new_default_query";
|
||||
}
|
||||
elsif ($cgi->param('remtype') eq "asnamed") {
|
||||
@ -439,7 +440,7 @@ elsif (($cgi->param('cmdtype') eq "doit") && defined $cgi->param('remtype')) {
|
||||
# form - see bug 252295
|
||||
if (!$params->param('query_format')) {
|
||||
$params->param('query_format', 'advanced');
|
||||
$::buffer = $params->query_string;
|
||||
$buffer = $params->query_string;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
@ -937,7 +938,7 @@ $vars->{'closedstates'} = ['CLOSED', 'VERIFIED', 'RESOLVED'];
|
||||
# buffer that was created when we initially parsed the URL on script startup,
|
||||
# then we remove all non-query fields from it, f.e. the sort order (order)
|
||||
# and command type (cmdtype) fields.
|
||||
$vars->{'urlquerypart'} = $::buffer;
|
||||
$vars->{'urlquerypart'} = $buffer;
|
||||
$vars->{'urlquerypart'} =~ s/(order|cmdtype)=[^&]*&?//g;
|
||||
$vars->{'order'} = $order;
|
||||
|
||||
|
@ -44,13 +44,17 @@
|
||||
use strict;
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Chart;
|
||||
use Bugzilla::Series;
|
||||
use Bugzilla::User;
|
||||
|
||||
use vars qw($cgi $template $vars);
|
||||
use vars qw($vars);
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
my $template = Bugzilla->template;
|
||||
|
||||
# Go back to query.cgi if we are adding a boolean chart parameter.
|
||||
if (grep(/^cmd-/, $cgi->param())) {
|
||||
@ -60,7 +64,6 @@ if (grep(/^cmd-/, $cgi->param())) {
|
||||
exit;
|
||||
}
|
||||
|
||||
my $template = Bugzilla->template;
|
||||
my $action = $cgi->param('action');
|
||||
my $series_id = $cgi->param('series_id');
|
||||
|
||||
|
@ -27,7 +27,6 @@ use lib qw(.);
|
||||
|
||||
use vars qw(
|
||||
@legal_keywords
|
||||
$buffer
|
||||
$template
|
||||
$vars
|
||||
);
|
||||
@ -35,7 +34,7 @@ use vars qw(
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
Bugzilla->login();
|
||||
|
||||
@ -150,7 +149,7 @@ if (defined $cgi->cookie('COLUMNLIST')) {
|
||||
$vars->{'collist'} = \@collist;
|
||||
$vars->{'splitheader'} = $cgi->cookie('SPLITHEADER') ? 1 : 0;
|
||||
|
||||
$vars->{'buffer'} = $::buffer;
|
||||
$vars->{'buffer'} = $cgi->query_string();
|
||||
|
||||
# Generate and return the UI (HTML page) from the appropriate template.
|
||||
print $cgi->header();
|
||||
|
@ -31,7 +31,7 @@ use strict;
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
use lib qw(.);
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Retrieve this installation's configuration.
|
||||
GetVersionTable();
|
||||
|
@ -25,7 +25,7 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::BugMail;
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
use strict;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
|
@ -28,7 +28,7 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
|
@ -26,7 +26,7 @@ use lib qw(.);
|
||||
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw($vars @legal_product);
|
||||
|
||||
|
@ -27,7 +27,7 @@ use lib ".";
|
||||
use Bugzilla;
|
||||
use Bugzilla::User;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Use the global template variables.
|
||||
use vars qw($vars $template);
|
||||
|
@ -30,7 +30,7 @@ use Bugzilla::Constants;
|
||||
use Bugzilla::Config qw(:DEFAULT :admin $datadir);
|
||||
use Bugzilla::User;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
|
@ -30,7 +30,6 @@ use AnyDBM_File;
|
||||
use lib qw(.);
|
||||
|
||||
require "globals.pl";
|
||||
require "CGI.pl";
|
||||
|
||||
use Bugzilla;
|
||||
use Bugzilla::Search;
|
||||
|
@ -28,7 +28,6 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
@ -36,6 +35,7 @@ use Bugzilla::Config qw(:DEFAULT $datadir);
|
||||
use Bugzilla::Series;
|
||||
use Bugzilla::Util;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::Bug;
|
||||
|
||||
use vars qw($template $vars);
|
||||
|
||||
|
@ -29,7 +29,7 @@ use strict;
|
||||
use lib ".";
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Use Bugzilla's flag modules for handling flag types.
|
||||
use Bugzilla;
|
||||
|
@ -32,7 +32,7 @@ use lib ".";
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
|
@ -23,7 +23,7 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Config qw(:DEFAULT $datadir);
|
||||
|
@ -19,7 +19,6 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
|
@ -29,7 +29,7 @@ use Bugzilla::Constants;
|
||||
use Bugzilla::Config qw(:DEFAULT :admin);
|
||||
use Bugzilla::User;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
|
@ -33,7 +33,6 @@ use strict;
|
||||
use lib ".";
|
||||
use vars qw ($template $vars);
|
||||
use Bugzilla::Constants;
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla::Bug;
|
||||
use Bugzilla::Series;
|
||||
|
@ -24,7 +24,7 @@ use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::User::Setting;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Use global template variables.
|
||||
use vars qw($template $vars);
|
||||
|
@ -18,7 +18,6 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw( $vars );
|
||||
|
@ -31,7 +31,6 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
|
@ -28,7 +28,6 @@
|
||||
use strict;
|
||||
|
||||
use lib ".";
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw( $vars );
|
||||
|
@ -41,7 +41,7 @@ use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Bug;
|
||||
use Bugzilla::User;
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw(
|
||||
$template
|
||||
|
@ -37,6 +37,7 @@ use Bugzilla::Util;
|
||||
use Bugzilla::Config qw(:DEFAULT ChmodDataFile $localconfig $datadir);
|
||||
use Bugzilla::BugMail;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::Error;
|
||||
|
||||
# Shut up misguided -w warnings about "used only once". For some reason,
|
||||
# "use vars" chokes on me when I try it here.
|
||||
|
@ -69,7 +69,6 @@ $Data::Dumper::Useqq = 1;
|
||||
use Bugzilla::BugMail;
|
||||
use Bugzilla::User;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
GetVersionTable();
|
||||
|
@ -30,11 +30,9 @@ use strict;
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
use lib ".";
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw(
|
||||
$vars
|
||||
);
|
||||
use vars qw($vars);
|
||||
|
||||
# Check whether or not the user is logged in and, if so, set the $::userid
|
||||
use Bugzilla::Constants;
|
||||
|
@ -23,10 +23,9 @@
|
||||
|
||||
use strict;
|
||||
use lib qw(.);
|
||||
use Bugzilla;
|
||||
|
||||
require "CGI.pl";
|
||||
|
||||
our $cgi;
|
||||
my $cgi = Bugzilla->cgi;
|
||||
|
||||
# Convert comma/space separated elements into separate params
|
||||
my @ids = ();
|
||||
|
@ -26,7 +26,7 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw($template $userid);
|
||||
|
||||
|
@ -34,7 +34,7 @@ use lib ".";
|
||||
|
||||
use Bugzilla;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw($template $vars);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
use strict;
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Bug;
|
||||
@ -37,7 +37,6 @@ use Bugzilla::Field;
|
||||
# "use vars" chokes on me when I try it here.
|
||||
sub sillyness {
|
||||
my $zz;
|
||||
$zz = $::buffer;
|
||||
$zz = %::components;
|
||||
$zz = %::versions;
|
||||
$zz = @::legal_opsys;
|
||||
@ -52,9 +51,7 @@ sub sillyness {
|
||||
use vars qw($vars $template);
|
||||
|
||||
my $user = Bugzilla->login(LOGIN_REQUIRED);
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
|
||||
my $dbh = Bugzilla->dbh;
|
||||
|
||||
# do a match on the fields if applicable
|
||||
@ -94,7 +91,7 @@ if (defined $cgi->param('product')) {
|
||||
}
|
||||
|
||||
if (defined $cgi->param('maketemplate')) {
|
||||
$vars->{'url'} = $::buffer;
|
||||
$vars->{'url'} = $cgi->query_string();
|
||||
|
||||
print $cgi->header();
|
||||
$template->process("bug/create/make-template.html.tmpl", $vars)
|
||||
|
@ -46,7 +46,7 @@ my $PrivilegesRequired = 0;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Bug;
|
||||
|
@ -28,7 +28,7 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Search;
|
||||
@ -36,7 +36,6 @@ use Bugzilla::User;
|
||||
use Bugzilla::Util;
|
||||
|
||||
use vars qw(
|
||||
@CheckOptionValues
|
||||
@legal_resolution
|
||||
@legal_bug_status
|
||||
@legal_components
|
||||
@ -57,6 +56,7 @@ use vars qw(
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my $buffer = $cgi->query_string();
|
||||
|
||||
if ($cgi->param("GoAheadAndLogIn")) {
|
||||
# We got here from a login page, probably from relogin.cgi. We better
|
||||
@ -112,7 +112,7 @@ if ($cgi->param('nukedefaultquery')) {
|
||||
" WHERE userid = ? AND name = ?",
|
||||
undef, ($userid, DEFAULT_QUERY_NAME));
|
||||
}
|
||||
$::buffer = "";
|
||||
$buffer = "";
|
||||
}
|
||||
|
||||
my $userdefaultquery;
|
||||
@ -200,7 +200,7 @@ sub PrefillForm {
|
||||
}
|
||||
|
||||
|
||||
if (!PrefillForm($::buffer)) {
|
||||
if (!PrefillForm($buffer)) {
|
||||
# Ah-hah, there was no form stuff specified. Do it again with the
|
||||
# default query.
|
||||
if ($userdefaultquery) {
|
||||
|
@ -25,15 +25,11 @@
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw(
|
||||
$userid
|
||||
$template
|
||||
$vars
|
||||
);
|
||||
use vars qw($userid $template $vars);
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
|
||||
|
@ -23,11 +23,9 @@
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw($template $vars);
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
use Bugzilla;
|
||||
use Bugzilla::Error;
|
||||
|
||||
# We don't want to remove a random logincookie from the db, so
|
||||
# call Bugzilla->login(). If we're logged in after this, then
|
||||
@ -36,9 +34,11 @@ Bugzilla->login();
|
||||
|
||||
Bugzilla->logout();
|
||||
|
||||
my $template = Bugzilla->template;
|
||||
my $cgi = Bugzilla->cgi;
|
||||
print $cgi->header();
|
||||
|
||||
my $vars = {};
|
||||
$vars->{'message'} = "logged_out";
|
||||
$template->process("global/message.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -24,7 +24,7 @@
|
||||
use strict;
|
||||
use lib ".";
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw($template $vars @legal_opsys @legal_platform @legal_severity);
|
||||
|
||||
@ -32,6 +32,7 @@ use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
|
||||
my $cgi = Bugzilla->cgi;
|
||||
my $buffer = $cgi->query_string();
|
||||
|
||||
# Go straight back to query.cgi if we are adding a boolean chart.
|
||||
if (grep(/^cmd-/, $cgi->param())) {
|
||||
@ -266,9 +267,9 @@ if ($action eq "wrap") {
|
||||
# We need to keep track of the defined restrictions on each of the
|
||||
# axes, because buglistbase, below, throws them away. Without this, we
|
||||
# get buglistlinks wrong if there is a restriction on an axis field.
|
||||
$vars->{'col_vals'} = join("&", $::buffer =~ /[&?]($col_field=[^&]+)/g);
|
||||
$vars->{'row_vals'} = join("&", $::buffer =~ /[&?]($row_field=[^&]+)/g);
|
||||
$vars->{'tbl_vals'} = join("&", $::buffer =~ /[&?]($tbl_field=[^&]+)/g);
|
||||
$vars->{'col_vals'} = join("&", $buffer =~ /[&?]($col_field=[^&]+)/g);
|
||||
$vars->{'row_vals'} = join("&", $buffer =~ /[&?]($row_field=[^&]+)/g);
|
||||
$vars->{'tbl_vals'} = join("&", $buffer =~ /[&?]($tbl_field=[^&]+)/g);
|
||||
|
||||
# We need a number of different variants of the base URL for different
|
||||
# URLs in the HTML.
|
||||
|
@ -39,8 +39,6 @@ use lib qw(.);
|
||||
|
||||
use Bugzilla::Config qw(:DEFAULT $datadir);
|
||||
|
||||
require "CGI.pl";
|
||||
|
||||
require "globals.pl";
|
||||
use vars qw(@legal_product); # globals from er, globals.pl
|
||||
|
||||
|
@ -29,7 +29,7 @@ use strict;
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
use lib qw(.);
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Use Bugzilla's Request module which contains utilities for handling requests.
|
||||
use Bugzilla::Flag;
|
||||
|
@ -27,7 +27,7 @@ use strict;
|
||||
|
||||
use lib qw(.);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
|
||||
|
@ -27,7 +27,7 @@ use strict;
|
||||
use lib qw(.);
|
||||
use vars qw ($template $vars);
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use Bugzilla::Bug;
|
||||
|
||||
@ -54,7 +54,7 @@ ValidateBugID($bug_id);
|
||||
|
||||
$vars->{'bug_id'} = $bug_id;
|
||||
|
||||
print Bugzilla->cgi->header();
|
||||
print $cgi->header();
|
||||
|
||||
$template->process("bug/activity/show.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
@ -28,7 +28,7 @@ use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
use vars qw($template $vars $userid);
|
||||
|
||||
|
@ -32,7 +32,7 @@ use Bugzilla::Util;
|
||||
use Bugzilla::BugMail;
|
||||
use Bugzilla::Bug;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
Bugzilla->login();
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
use strict;
|
||||
|
||||
use lib qw(.);
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::Bug;
|
||||
|
||||
|
@ -18,13 +18,10 @@
|
||||
use strict;
|
||||
|
||||
use lib ".";
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Shut up "Used Only Once" errors
|
||||
use vars qw(
|
||||
$template
|
||||
$vars
|
||||
);
|
||||
use vars qw($template $vars);
|
||||
|
||||
Bugzilla->login();
|
||||
|
||||
|
@ -27,7 +27,7 @@ use Bugzilla::Bug; # EmitDependList
|
||||
use Bugzilla::Util; # trim
|
||||
use Bugzilla::Constants; # LOGIN_*
|
||||
use Bugzilla::User; # UserInGroup
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
GetVersionTable();
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
[% USE Bugzilla %]
|
||||
[% cgi = Bugzilla.cgi %]
|
||||
|
||||
[% IF help %]
|
||||
[% IF cgi.param("help") %]
|
||||
[% IF cgi.user_agent("Mozilla/5") %]
|
||||
<style type="text/css">
|
||||
.help {
|
||||
|
@ -22,7 +22,7 @@
|
||||
[% USE Bugzilla %]
|
||||
[% cgi = Bugzilla.cgi %]
|
||||
|
||||
[% IF help %]
|
||||
[% IF cgi.param("help") %]
|
||||
[% IF cgi.user_agent("Mozilla/5") %]
|
||||
[% FOREACH h = help_html %]
|
||||
<div id="[% h.id %]_help" class="help" style="display: none;">
|
||||
|
@ -51,7 +51,7 @@ var queryform = "queryform"
|
||||
[% button_name = "Search" %]
|
||||
|
||||
[%# The decent help requires Javascript %]
|
||||
[% IF NOT help %]
|
||||
[% IF NOT cgi.param("help") %]
|
||||
[% IF cgi.user_agent("Mozilla/5") %]
|
||||
<script type="text/javascript"> <!--
|
||||
document.write("<p><a href='query.cgi?help=1&format=advanced'>Give me some help</a> (reloads page.)</p>");
|
||||
@ -82,6 +82,6 @@ var queryform = "queryform"
|
||||
|
||||
</form>
|
||||
|
||||
[% PROCESS "search/search-help.html.tmpl" IF help %]
|
||||
[% PROCESS "search/search-help.html.tmpl" IF cgi.param("help") %]
|
||||
|
||||
[% PROCESS global/footer.html.tmpl %]
|
||||
|
@ -39,7 +39,7 @@ my $cgi = Bugzilla->cgi;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
|
||||
# Include the Bugzilla CGI and general utility library.
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
Bugzilla->login(LOGIN_OPTIONAL);
|
||||
|
||||
|
@ -32,7 +32,7 @@ use Bugzilla::Search;
|
||||
use Bugzilla::Util;
|
||||
use Bugzilla::User;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Use global template variables.
|
||||
use vars qw($template $vars $userid);
|
||||
|
@ -30,7 +30,7 @@ use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::Bug;
|
||||
|
||||
require "CGI.pl";
|
||||
require "globals.pl";
|
||||
|
||||
# Use global template variables
|
||||
use vars qw($template $vars);
|
||||
|
@ -25,10 +25,9 @@
|
||||
use strict;
|
||||
|
||||
use lib qw(.);
|
||||
use Bugzilla;
|
||||
|
||||
require "CGI.pl";
|
||||
|
||||
our $cgi;
|
||||
my $cgi = Bugzilla->cgi;
|
||||
|
||||
# Convert comma/space separated elements into separate params
|
||||
my @ids = ();
|
||||
|
Loading…
Reference in New Issue
Block a user