aboutsummaryrefslogtreecommitdiffstats
path: root/editclassifications.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-20 18:14:14 +0000
committermkanat%kerio.com <>2005-02-20 18:14:14 +0000
commitc1d16e426c2d1f2fe5563c0d20b3b8eb256d8c77 (patch)
treef53fcbc0380781593d41ab6ac3e903b1c929f356 /editclassifications.cgi
parentd7958942a691a719be4d3433b5a24817c8646f9a (diff)
downloadbugs-c1d16e426c2d1f2fe5563c0d20b3b8eb256d8c77.tar
bugs-c1d16e426c2d1f2fe5563c0d20b3b8eb256d8c77.tar.gz
bugs-c1d16e426c2d1f2fe5563c0d20b3b8eb256d8c77.tar.bz2
bugs-c1d16e426c2d1f2fe5563c0d20b3b8eb256d8c77.tar.xz
bugs-c1d16e426c2d1f2fe5563c0d20b3b8eb256d8c77.zip
Bug 282124: Remove globals.pl and CGI.pl from editclassifications.cgi
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=vladd, a=justdave
Diffstat (limited to 'editclassifications.cgi')
-rwxr-xr-xeditclassifications.cgi15
1 files changed, 9 insertions, 6 deletions
diff --git a/editclassifications.cgi b/editclassifications.cgi
index fd02befef..54f0c26ae 100755
--- a/editclassifications.cgi
+++ b/editclassifications.cgi
@@ -16,6 +16,7 @@
# The Initial Developer of the Original Code is Albert Ting
#
# Contributor(s): Albert Ting <alt@sonic.net>
+# Max Kanat-Alexander <mkanat@kerio.com>
#
# Direct any questions on this source code to mozilla.org
@@ -24,19 +25,21 @@ use lib ".";
use Bugzilla;
use Bugzilla::Constants;
-require "CGI.pl";
-require "globals.pl";
+use Bugzilla::Util;
+use Bugzilla::Error;
+use Bugzilla::Config;
my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh;
+my $template = Bugzilla->template;
+my $vars = {};
-use vars qw ($template $vars);
-
-# TestClassification: just returns if the specified classification does exists
+# TestClassification: just returns if the specified classification does exist
# CheckClassification: same check, optionally emit an error text
sub TestClassification ($) {
my $cl = shift;
+ my $dbh = Bugzilla->dbh;
trick_taint($cl);
# does the classification exist?
@@ -78,7 +81,7 @@ Bugzilla->login(LOGIN_REQUIRED);
print $cgi->header();
-UserInGroup("editclassifications")
+exists Bugzilla->user->groups->{'editclassifications'}
|| ThrowUserError("auth_failure", {group => "editclassifications",
action => "edit",
object => "classifications"});