summaryrefslogtreecommitdiffstats
path: root/extensions/Example
diff options
context:
space:
mode:
authorAlbert Ting <altlist@gmail.com>2015-01-08 18:49:25 +0100
committerDylan William Hardison <dylan@hardison.net>2015-01-13 16:06:54 +0100
commit8762d1e68c4ea2343f445bb4beb46c1ae04586b1 (patch)
treeb26119ae24f924c50ca50a57dbedd2c6780e3d1b /extensions/Example
parentcde1c5854904f8989e39a217b1d4f02c9204428e (diff)
downloadbugzilla-8762d1e68c4ea2343f445bb4beb46c1ae04586b1.tar.gz
bugzilla-8762d1e68c4ea2343f445bb4beb46c1ae04586b1.tar.xz
Bug 832095 - Request new buglist/query hooks
Diffstat (limited to 'extensions/Example')
-rw-r--r--extensions/Example/Extension.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm
index af36b107a..0ab5220a7 100644
--- a/extensions/Example/Extension.pm
+++ b/extensions/Example/Extension.pm
@@ -304,6 +304,17 @@ sub buglist_column_joins {
};
}
+sub buglist_format {
+ my ($self, $args) = @_;
+ my $vars = $args->{'vars'};
+ my $format = $args->{'format'};
+ my $params = $args->{'params'};
+
+ if ($format->{'template'} eq "list/list-example.html.tmpl") {
+ $vars->{'example'} = $params->param('example');
+ }
+}
+
sub search_operator_field_override {
my ($self, $args) = @_;
@@ -856,6 +867,18 @@ sub product_end_of_create {
}
}
+sub query_format {
+ my ($self, $args) = @_;
+ my $vars = $args->{'vars'};
+ my $default = $vars->{'default'};
+ my $format = $args->{'format'};
+
+ # change some default values
+ if ($format->{'template'} eq "search/search-example.html.tmpl") {
+ $default->{'example'}[0] = $default->{'example'}[0] || "example";
+ }
+}
+
sub quicksearch_map {
my ($self, $args) = @_;
my $map = $args->{'map'};