]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 301508: Remove CGI.pl - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat...
authorlpsolit%gmail.com <>
Wed, 10 Aug 2005 08:30:39 +0000 (08:30 +0000)
committerlpsolit%gmail.com <>
Wed, 10 Aug 2005 08:30:39 +0000 (08:30 +0000)
58 files changed:
Bugzilla/Attachment.pm
Bugzilla/Flag.pm
Bugzilla/FlagType.pm
Bugzilla/Search.pm
Bugzilla/Token.pm
CGI.pl [deleted file]
attachment.cgi
buglist.cgi
chart.cgi
colchange.cgi
config.cgi
contrib/sendunsentbugmail.pl
contrib/syncLDAP.pl
createaccount.cgi
describecomponents.cgi
describekeywords.cgi
doeditparams.cgi
duplicates.cgi
editcomponents.cgi
editflagtypes.cgi
editgroups.cgi
editkeywords.cgi
editmilestones.cgi
editparams.cgi
editproducts.cgi
editsettings.cgi
editusers.cgi
editversions.cgi
editwhines.cgi
enter_bug.cgi
globals.pl
importxml.pl
index.cgi
long_list.cgi
move.pl
page.cgi
post_bug.cgi
process_bug.cgi
query.cgi
quips.cgi
relogin.cgi
report.cgi
reports.cgi
request.cgi
sanitycheck.cgi
show_activity.cgi
show_bug.cgi
showdependencygraph.cgi
showdependencytree.cgi
sidebar.cgi
summarize_time.cgi
template/en/default/global/help-header.html.tmpl
template/en/default/global/help.html.tmpl
template/en/default/search/search-advanced.html.tmpl
token.cgi
userprefs.cgi
votes.cgi
xml.cgi

index 10fa6ddfc2019f2444aeafddf63bdc4047e44664..78f4ceed56bc93c10eaa424c6d8c60720672ce12 100644 (file)
@@ -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;
index 65636d78c3f51dc03adb950eb210ce1fb7801593..6c5adf440bf82aed3863fea4b6b9c36a350cc06b 100644 (file)
@@ -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 *
 
index 49c9f777e8d597b8644b73c375c31e53aaecec29..678721b5f0383f637033c866ee6640752f5d470c 100644 (file)
@@ -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 *
 
index 31dbcd2ab5498b13b05ab5133d3aa115c0f40ea7..0b1ac94bace66e7cdac71c9cf641bbf3ef08c5e4 100644 (file)
@@ -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);
 
index fe72915a36b4a725d2f0599b50fc5d7853f87e03..44ee1a642de42c10e046f249973a915f8f521676 100644 (file)
@@ -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
diff --git a/CGI.pl b/CGI.pl
deleted file mode 100644 (file)
index c1b8aca..0000000
--- a/CGI.pl
+++ /dev/null
@@ -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;
index 1ed7a2322091c1fc351755956258a38b1b9866f1..ea04e2c1990297bb53b741937fdbeeb88ef6ead3 100755 (executable)
@@ -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)
index 45c0db5524a4f5e4261b652abb76d758ffb48585..6bc3af291c78a741c0502332cb312d0efc037b2c 100755 (executable)
@@ -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;
 
index bc25d52e919c0738a2b183f4696961939e3a1a3f..31f961cacff01d9debe06850a6b314aafb31ac2c 100755 (executable)
--- a/chart.cgi
+++ b/chart.cgi
 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');
 
index 30103406fd33553af04b8ecfbf3759379bdddbc3..e99b81b70773248b2357feaf4dc46bfb4a69def8 100755 (executable)
@@ -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();
index 1306c0b668689f59d80f35bca267658ea28aa158..bbffe20d85eacfdf5bbbeb3302ecea4d111d8e87 100755 (executable)
@@ -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();
index c82c0ae30c49d0c4b522e04ab7b78dd9eb4d405a..9453a6538e0c8c073b7a203482244a9a505b7b61 100644 (file)
@@ -25,7 +25,7 @@ use strict;
 
 use lib qw(.);
 
-require "CGI.pl";
+require "globals.pl";
 use Bugzilla::Constants;
 use Bugzilla::BugMail;
 
index 14ba1402cea023d6bf019867b52540e637bdb7b0..6e78854e05bdde6419ac6fc7b5d91811cec58e30 100755 (executable)
@@ -23,7 +23,7 @@
 
 use strict;
 
-require "CGI.pl";
+require "globals.pl";
 
 use lib qw(.);
 
index 337f89d0a18a74561bffb04dd7d060853dbe6b39..29b3c00ec3aba76a5afc20a1c81aec76f8a08b89 100755 (executable)
@@ -28,7 +28,7 @@ use strict;
 
 use lib qw(.);
 
-require "CGI.pl";
+require "globals.pl";
 
 use Bugzilla;
 use Bugzilla::Constants;
index 8e175549814af007938872d3a86e41806b19a3a1..9602c0fe0bba8fe1839a787139039da56364b04e 100755 (executable)
@@ -26,7 +26,7 @@ use lib qw(.);
 
 use Bugzilla;
 use Bugzilla::Constants;
-require "CGI.pl";
+require "globals.pl";
 
 use vars qw($vars @legal_product);
 
index e7b3b759b5390bb4fe6eb3a25bbfd8ee0e0f401b..ab88c2f152b0c09054a739fb542a63061375c989 100755 (executable)
@@ -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);
index 431aa91c2f510192bbcf9c10ef402a9bc49489d5..cfc21e23d21c643fb7d5e7f5739a4c1b98b2d2fb 100755 (executable)
@@ -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);
 
index 744ad814730f2305edb1c59114536915e61d57f7..92c697f53454501f8b193cb14150e1d363477fe9 100755 (executable)
@@ -30,7 +30,6 @@ use AnyDBM_File;
 use lib qw(.);
 
 require "globals.pl";
-require "CGI.pl";
 
 use Bugzilla;
 use Bugzilla::Search;
index 6f8bc99f22efad1b068ab48f2b44a6ce9a62eaf5..c25f971fc570174c02828e1a57d0afa74e90aad4 100755 (executable)
@@ -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);
 
index 57795f4933a7b7ab2fb33c5d8109ba50df4eb910..ec449a87d4b15676b96fa0b2f2f64e85a62d8290 100755 (executable)
@@ -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;
index 5e74163dafd73a7d85c2089b8d310e1a60682003..e41dc7d073ec4ca2503419620a0a5da705c78ca7 100755 (executable)
@@ -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;
index 8ad74710e80b85da812042e6f3016d7be702513a..3062e3dede1a073a8c213230a1fc8a58c98c847c 100755 (executable)
@@ -23,7 +23,7 @@
 use strict;
 use lib ".";
 
-require "CGI.pl";
+require "globals.pl";
 
 use Bugzilla::Constants;
 use Bugzilla::Config qw(:DEFAULT $datadir);
index 4fbcab0468b542b2ea0f482180d745e94501a3d7..fa1117ede240498553b7c826f7e3a16fd011c804 100755 (executable)
@@ -19,7 +19,6 @@
 use strict;
 use lib ".";
 
-require "CGI.pl";
 require "globals.pl";
 
 use Bugzilla::Constants;
index 668a138017e34e6f3105290ac8f34ef90fdb72a5..264e991a4f73b8ec400153a1f082e1c8f7ed3826 100755 (executable)
@@ -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);
 
index 18e845efc51763e16e9c029ef0be1784343cb488..cacf8eef865c12bfda09fc1c46edce2622058764 100755 (executable)
@@ -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;
index 80a8921d561518aaf09d0ac986c44ab36394c0b1..742bd71766fa374e457cb8d96dbea7260ac3eca3 100755 (executable)
@@ -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);
index 9da66424d7ec30ee6e1d986e5e5e6a50d381cefa..f628752cdde1c7211365ba85113e260f76f8e8bf 100755 (executable)
@@ -18,7 +18,6 @@
 use strict;
 use lib ".";
 
-require "CGI.pl";
 require "globals.pl";
 
 use vars qw( $vars );
index a7ced7df3009f6d0a878f1f6b3b8b36e32a17e4f..cf2303e5f9f1164bcb9e63bd9b3465f9ab5953b1 100755 (executable)
@@ -31,7 +31,6 @@
 use strict;
 use lib ".";
 
-require "CGI.pl";
 require "globals.pl";
 
 use Bugzilla::Constants;
index 1f5c954f3994b91f6d7aeca42898515dd042de04..66387dd82ee5c7e7cfebb56da7556ebd97127f57 100755 (executable)
@@ -28,7 +28,6 @@
 use strict;
 
 use lib ".";
-require "CGI.pl";
 require "globals.pl";
 
 use vars qw( $vars );
index f3437b7ed0d187040757e1f82f9283fc1de569bd..1d85761b4968fca33cc56ce6a41978bb7c6dbf76 100755 (executable)
@@ -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
index f8f070366117816b5e230b92c66b6f992d24ee85..d4ba17004eab8985739f74c997745d4b031f828c 100644 (file)
@@ -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.
index 0d9dcb8683782e1eadee2fa8745ef743f0b5a999..9c56b3d1a3856f45b1e5bc7d02c87b976a9d61fb 100755 (executable)
@@ -69,7 +69,6 @@ $Data::Dumper::Useqq = 1;
 use Bugzilla::BugMail;
 use Bugzilla::User;
 
-require "CGI.pl";
 require "globals.pl";
 
 GetVersionTable();
index 88393b41787700c13d33f2c8dcc617b1fe2f49ad..bc3a1272fcbf627d2212e0bebe7e3a9118564526 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -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;
index 04758729d0b2bd3d9019964ab4753813a6a68d35..a5d59909bc87b01a3675e008e17a8fefd4e50ceb 100755 (executable)
 
 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 = ();
diff --git a/move.pl b/move.pl
index 92a051b63467a8c0b7778afd1a94d3fd2efefe56..82c40034db09494f5486b80a6215edd24e231209 100755 (executable)
--- a/move.pl
+++ b/move.pl
@@ -26,7 +26,7 @@ use strict;
 
 use lib qw(.);
 
-require "CGI.pl";
+require "globals.pl";
 
 use vars qw($template $userid);
 
index 6e78317fc06f88cf215de5da79df44848aae115b..9954c64a8f271cbae1cac6420f030542bc3e7c9b 100755 (executable)
--- a/page.cgi
+++ b/page.cgi
@@ -34,7 +34,7 @@ use lib ".";
 
 use Bugzilla;
 
-require "CGI.pl";
+require "globals.pl";
 
 use vars qw($template $vars);
 
index 01c0e18452e220b0ef6cb5005bf6bb30f78f90dd..0c421b6380346d18acce83cda9eaa135088f6cca 100755 (executable)
@@ -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)
index 9a3db0a8f1f7b57f23b63807fecc1021599723b3..c624eff3ae46c8ed50679c8d0bc3affdf894d3c9 100755 (executable)
@@ -46,7 +46,7 @@ my $PrivilegesRequired = 0;
 
 use lib qw(.);
 
-require "CGI.pl";
+require "globals.pl";
 use Bugzilla;
 use Bugzilla::Constants;
 use Bugzilla::Bug;
index ff04c15a0cd58603add2f41b1aeffa32765ea8df..a25f8535dce51020ecbd33483d709bac236cab19 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -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) {
index d811ee5fe45d05ec8dad0c7c3b2e45fb761229d3..364f51448d8e59a0d81bb54053222cffac56aea4 100755 (executable)
--- a/quips.cgi
+++ b/quips.cgi
 
 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;
 
index 6843405c20ef8e8f7bd7e4d663f021f36fec66fe..f743eb8f3eb353722f7e547c629c79a9b4398704 100755 (executable)
 
 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());
index 30c7cade8731519d20d03da5442e40ea650c4df7..e7b94ffc2aa8b21199ac602aaa8cb5b4f1b99856 100755 (executable)
@@ -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.
index e8191a0d04351e098126ed80074e4a2bd2e709e8..49948e2bb23294d685529a03d151990474b5182a 100755 (executable)
@@ -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
 
index 4c6e7600f227b56ce88c1a136bb0bf5d2733226b..a3779bd8dcf43caed333b61cb6162501843c4792 100755 (executable)
@@ -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;
index 00a7ef0c5352cc7d6f9a56482f4513ceed03c91a..1035a8d2e91b45abdbc44ddc2881ac4e86fc38f0 100755 (executable)
@@ -27,7 +27,7 @@ use strict;
 
 use lib qw(.);
 
-require "CGI.pl";
+require "globals.pl";
 use Bugzilla::Constants;
 use Bugzilla::User;
 
index eacaeba372b366d6a47e65498a1a46fe6270af23..b0ad42379c07ddac3ef7b451f033abf9a79f1ae9 100755 (executable)
@@ -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());
index e855b442f2c1a2a7fd92e0a84bb5c3bec63e5acd..c45a7cd9970982667cd0021468a2ab006a2684ff 100755 (executable)
@@ -28,7 +28,7 @@ use Bugzilla;
 use Bugzilla::Constants;
 use Bugzilla::User;
 
-require "CGI.pl";
+require "globals.pl";
 
 use vars qw($template $vars $userid);
 
index 8f0ff5dfafe5efcb49a9b89acb6edd9575694ff4..4339bb3e595f65dfd46b23ca70377926aacbad04 100755 (executable)
@@ -32,7 +32,7 @@ use Bugzilla::Util;
 use Bugzilla::BugMail;
 use Bugzilla::Bug;
 
-require "CGI.pl";
+require "globals.pl";
 
 Bugzilla->login();
 
index e473357d1460be7708be60cb900dbdfcf7734d69..7c3b9946512f50822914f6f04206a99fe24c277f 100755 (executable)
@@ -26,7 +26,7 @@
 use strict;
 
 use lib qw(.);
-require "CGI.pl";
+require "globals.pl";
 use Bugzilla::User;
 use Bugzilla::Bug;
 
index 73a22d1b339a80c81a1815e1b0fadac9634549d5..15506eba43e9e2564d51c4ac520afc45355c2cae 100755 (executable)
 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();
 
index eb3aff23067c110fd6fca695f36a99712ee56709..31aedd9e1ef62d482667e23e602a242c17634357 100755 (executable)
@@ -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();
 
index 330ba9160a15355c8eeac9994322d04d5ad2b7fc..96814e93fd5185ef47f6a1301e43766d7f263830 100644 (file)
@@ -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 {
index 2095a0dcd53d1d3438ed3bb67c32fa4eb04b1f9a..cc69534da81e22e1efbb6f1913e49fbdf7e09a03 100644 (file)
@@ -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;">
index 880715c354bd784000559f93d61d512825964224..e55c71ba14ae8be4ce0e90d1fb15485918dd669d 100644 (file)
@@ -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&amp;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 %]
index f3e7bd7ce6d708a53c153d1363f9fe8b1bba404f..1d398f84d60416f2eea624c8b4ab7444c7e3b483 100755 (executable)
--- a/token.cgi
+++ b/token.cgi
@@ -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);
 
index 42ef255d34af9b84b31de182d7b0993489289af3..9d475f16c29b95892f69fa2a72abde982f3e1e45 100755 (executable)
@@ -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);
index 3d1ac71139148db56c119d6a8b22c6a41c9b1afa..8d7e7cf63a2b722070fb8319f0b5d96bab0d12c3 100755 (executable)
--- a/votes.cgi
+++ b/votes.cgi
@@ -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);
diff --git a/xml.cgi b/xml.cgi
index 103838f86957e2c2a1fb4c1c5144b13aebe802e3..8316971c9ace15c702eab7caa46becba7f763d41 100755 (executable)
--- a/xml.cgi
+++ b/xml.cgi
 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 = ();