From 764a1fa6d114eee04b04ec1419052e3e4caa02d2 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 22 Mar 2011 18:13:03 -0400 Subject: Bug 643904 - Bugzilla::Extension should export a web_dir attribute to get full path to the extension's web directory r/a=mkanat --- Bugzilla/Install/Util.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm index c8d3d8eb4..a2371a0be 100644 --- a/Bugzilla/Install/Util.pm +++ b/Bugzilla/Install/Util.pm @@ -46,6 +46,7 @@ our @EXPORT_OK = qw( extension_package_directory extension_requirement_packages extension_template_directory + extension_web_directory indicate_progress install_string include_languages @@ -214,6 +215,14 @@ sub extension_template_directory { return "$base_dir/template"; } +# Used in this file and in Bugzilla::Extension. +sub extension_web_directory { + my $extension = shift; + my $class = ref($extension) || $extension; + my $base_dir = extension_package_directory($class); + return "$base_dir/web"; +} + # For extensions that are in the extensions/ dir, this both sets and fetches # the name of the directory that stores an extension's "stuff". We need this # when determining the template directory for extensions (or other things -- cgit v1.2.3-24-g4f1b