From a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 29 Jun 2006 23:49:55 +0000 Subject: Bug 342121: Remove usage of Config qw(:locations) in favor of Constants::bz_locations() Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- Bugzilla/Template.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Template.pm') 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", -- cgit v1.2.3-24-g4f1b