summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-06-30 01:49:55 +0200
committermkanat%bugzilla.org <>2006-06-30 01:49:55 +0200
commita0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2 (patch)
treec69b87d1aba4ed1d77ec33abdaccafe249bd735b /Bugzilla/Template.pm
parent38b17a8f16b21bb3dae4f1e6c01c84a5adc5d38f (diff)
downloadbugzilla-a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2.tar.gz
bugzilla-a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2.tar.xz
Bug 342121: Remove usage of Config qw(:locations) in favor of Constants::bz_locations()
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 1fcc867b5..59cf02dc4 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -35,7 +35,7 @@ package Bugzilla::Template;
use strict;
use Bugzilla::Constants;
-use Bugzilla::Config qw(:DEFAULT $templatedir $datadir $project);
+use Bugzilla::Config;
use Bugzilla::Util;
use Bugzilla::User;
use Bugzilla::Error;
@@ -110,6 +110,9 @@ sub getTemplateIncludePath {
if ($template_include_path) {
return $template_include_path;
}
+ my $templatedir = bz_locations()->{'templatedir'};
+ my $project = bz_locations()->{'project'};
+
my $languages = trim(Param('languages'));
if (not ($languages =~ /,/)) {
if ($project) {
@@ -159,7 +162,7 @@ sub getTemplateIncludePath {
}
# add in extension template directories:
- my @extensions = glob($Bugzilla::Config::extensionsdir."/*");
+ my @extensions = glob(bz_locations()->{'extensionsdir'} . "/*");
foreach my $extension (@extensions) {
trick_taint($extension); # since this comes right from the filesystem
# we have bigger issues if it is insecure
@@ -533,7 +536,7 @@ sub create {
PRE_CHOMP => 1,
TRIM => 1,
- COMPILE_DIR => "$datadir/template",
+ COMPILE_DIR => bz_locations()->{'datadir'} . "/template",
# Initialize templates (f.e. by loading plugins like Hook).
PRE_PROCESS => "global/initialize.none.tmpl",