From 8706ac3f66305223b33be8106d3c3d4018f83308 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 1 Aug 2006 05:18:25 +0000 Subject: Bug 346552: Move checksetup's permission-fixing code into a module Patch By Max Kanat-Alexander (module owner) a=myk --- Bugzilla/Template.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Template.pm') 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; } -- cgit v1.2.3-24-g4f1b