use Bugzilla::Error;
use Bugzilla::Install::Util qw(
extension_code_files extension_template_directory
- extension_package_directory);
+ extension_package_directory extension_web_directory);
use File::Basename;
use File::Spec;
sub template_dir { return extension_template_directory(@_); }
sub package_dir { return extension_package_directory(@_); }
+sub web_dir { return extension_web_directory(@_); }
######################
# Helper Subroutines #
If you want to override this method, and you have a F<Config.pm>, you must
override this method in F<Config.pm>.
+=head3 C<web_dir>
+
+The directory that your package's web related files are in, such as css and javascript.
+
+This defaults to the C<web> subdirectory of the L</package_dir>.
+
+If you want to override this method, and you have a F<Config.pm>, you must
+override this method in F<Config.pm>.
+
=head3 C<lib_dir>
The directory where your extension's libraries are.
extension_package_directory
extension_requirement_packages
extension_template_directory
+ extension_web_directory
indicate_progress
install_string
include_languages
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