Commit c1d16e42 authored by mkanat%kerio.com's avatar mkanat%kerio.com

Bug 282124: Remove globals.pl and CGI.pl from editclassifications.cgi

Patch By Max Kanat-Alexander <mkanat@kerio.com> r=vladd, a=justdave
parent d7958942
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
# The Initial Developer of the Original Code is Albert Ting # The Initial Developer of the Original Code is Albert Ting
# #
# Contributor(s): Albert Ting <alt@sonic.net> # Contributor(s): Albert Ting <alt@sonic.net>
# Max Kanat-Alexander <mkanat@kerio.com>
# #
# Direct any questions on this source code to mozilla.org # Direct any questions on this source code to mozilla.org
...@@ -24,19 +25,21 @@ use lib "."; ...@@ -24,19 +25,21 @@ use lib ".";
use Bugzilla; use Bugzilla;
use Bugzilla::Constants; use Bugzilla::Constants;
require "CGI.pl"; use Bugzilla::Util;
require "globals.pl"; use Bugzilla::Error;
use Bugzilla::Config;
my $cgi = Bugzilla->cgi; my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $template = Bugzilla->template;
my $vars = {};
use vars qw ($template $vars); # TestClassification: just returns if the specified classification does exist
# TestClassification: just returns if the specified classification does exists
# CheckClassification: same check, optionally emit an error text # CheckClassification: same check, optionally emit an error text
sub TestClassification ($) { sub TestClassification ($) {
my $cl = shift; my $cl = shift;
my $dbh = Bugzilla->dbh;
trick_taint($cl); trick_taint($cl);
# does the classification exist? # does the classification exist?
...@@ -78,7 +81,7 @@ Bugzilla->login(LOGIN_REQUIRED); ...@@ -78,7 +81,7 @@ Bugzilla->login(LOGIN_REQUIRED);
print $cgi->header(); print $cgi->header();
UserInGroup("editclassifications") exists Bugzilla->user->groups->{'editclassifications'}
|| ThrowUserError("auth_failure", {group => "editclassifications", || ThrowUserError("auth_failure", {group => "editclassifications",
action => "edit", action => "edit",
object => "classifications"}); object => "classifications"});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment