summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
authorrojanu <aliustek@gmail.com>2012-04-10 20:36:46 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-04-10 20:36:46 +0200
commit4e4dfab33df60ecb6a529999b8900f4dc19d9b91 (patch)
tree3edc60a3fda069bea37763021e3f708f8d2eb353 /Bugzilla/Search.pm
parent6de7db5b4dab5309ca1683d58ce444cc6e6bdf88 (diff)
downloadbugzilla-4e4dfab33df60ecb6a529999b8900f4dc19d9b91.tar.gz
bugzilla-4e4dfab33df60ecb6a529999b8900f4dc19d9b91.tar.xz
Bug 743991: Need a new hook to update Bugzilla::Search::COLUMN_JOINS
r/a=LpSolit
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 5fe88a4f2..03242ae83 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -959,7 +959,8 @@ sub _column_join {
my ($self, $field) = @_;
# The _realname fields require the same join as the username fields.
$field =~ s/_realname$//;
- my $join_info = COLUMN_JOINS->{$field};
+ my $column_joins = $self->_get_column_joins();
+ my $join_info = $column_joins->{$field};
if ($join_info) {
# Don't allow callers to modify the constant.
$join_info = dclone($join_info);
@@ -1797,6 +1798,20 @@ sub _get_operator_field_override {
return $cache->{operator_field_override};
}
+sub _get_column_joins {
+ my $self = shift;
+ my $cache = Bugzilla->request_cache;
+
+ return $cache->{column_joins} if defined $cache->{column_joins};
+
+ my %column_joins = %{ COLUMN_JOINS() };
+ Bugzilla::Hook::process('buglist_column_joins',
+ { column_joins => \%column_joins });
+
+ $cache->{column_joins} = \%column_joins;
+ return $cache->{column_joins};
+}
+
###########################
# Search Function Helpers #
###########################