summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-01 07:18:25 +0200
committermkanat%bugzilla.org <>2006-08-01 07:18:25 +0200
commit8706ac3f66305223b33be8106d3c3d4018f83308 (patch)
tree8ca17c72fccf2f8632f7ce7217e52868c5e18525 /Bugzilla/Template.pm
parentef536b4a8ff4f9c8ff82da5d4e3114721c20926e (diff)
downloadbugzilla-8706ac3f66305223b33be8106d3c3d4018f83308.tar.gz
bugzilla-8706ac3f66305223b33be8106d3c3d4018f83308.tar.xz
Bug 346552: Move checksetup's permission-fixing code into a module
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index f3625ee22..756c3cc44 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -853,6 +853,7 @@ sub precompile_templates {
# Precompile all the templates found in all the directories.
%_templates_to_precompile = ();
foreach my $subdir (qw(custom extension default), bz_locations()->{'project'}) {
+ next unless $subdir; # If 'project' is empty.
$_current_path = File::Spec->catdir($templatedir, $dir, $subdir);
next unless -d $_current_path;
# Traverse the template hierarchy.
@@ -861,7 +862,6 @@ sub precompile_templates {
# The sort isn't totally necessary, but it makes debugging easier
# by making the templates always be compiled in the same order.
foreach my $file (sort keys %_templates_to_precompile) {
- my $path = File::Spec->catdir($templatedir, $dir);
# Compile the template but throw away the result. This has the side-
# effect of writing the compiled version to disk.
$template->context->template($file);
@@ -876,7 +876,7 @@ sub _precompile_push {
return if ($name =~ /\/CVS\//);
return if ($name !~ /\.tmpl$/);
- $name =~ s/\Q$_current_path\E\///;
+ $name =~ s/\Q$_current_path\E\///;
$_templates_to_precompile{$name} = 1;
}