Bug 562551: Allow template-only extensions to work

r=mkanat, a=mkanat (module owner)


git-svn-id: svn://10.0.0.236/trunk@260265 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2010-05-06 02:17:23 +00:00
parent 41b6736efb
commit 13f5101b6d
2 changed files with 13 additions and 1 deletions

View File

@ -1 +1 @@
7145
7146

View File

@ -418,6 +418,18 @@ sub _template_base_directories {
}
}
# Extensions may also contain *only* templates, in which case they
# won't show up in extension_requirement_packages.
foreach my $path (_extension_paths()) {
next if !-d $path;
if (!-e "$path/Extension.pm" and !-e "$path/Config.pm"
and -d "$path/template")
{
push(@template_dirs, "$path/template");
}
}
push(@template_dirs, bz_locations()->{'templatedir'});
return \@template_dirs;
}