summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB.pm4
-rw-r--r--Bugzilla/Template/Plugin/Bugzilla.pm13
2 files changed, 14 insertions, 3 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index 681b0597a..23078369a 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -60,7 +60,7 @@ sub SendSQL {
require Bugzilla;
- $_current_sth = Bugzilla->instance->dbh->prepare($str);
+ $_current_sth = Bugzilla->dbh->prepare($str);
return $_current_sth->execute;
}
@@ -73,7 +73,7 @@ sub SqlQuote {
require Bugzilla;
- my $res = Bugzilla->instance->dbh->quote($str);
+ my $res = Bugzilla->dbh->quote($str);
trick_taint($res);
diff --git a/Bugzilla/Template/Plugin/Bugzilla.pm b/Bugzilla/Template/Plugin/Bugzilla.pm
index 285553b7e..101bd06ee 100644
--- a/Bugzilla/Template/Plugin/Bugzilla.pm
+++ b/Bugzilla/Template/Plugin/Bugzilla.pm
@@ -31,7 +31,18 @@ use Bugzilla;
sub new {
my ($class, $context) = @_;
- return Bugzilla->instance;
+ return bless {}, $class;
+}
+
+sub AUTOLOAD {
+ my $class = shift;
+ our $AUTOLOAD;
+
+ $AUTOLOAD =~ s/^.*:://;
+
+ return if $AUTOLOAD eq 'DESTROY';
+
+ return Bugzilla->$AUTOLOAD(@_);
}
1;