diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-05-01 17:37:15 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-05-01 17:37:15 +0200 |
commit | b9ce8358e9822243421a37548e3d1f0371b97455 (patch) | |
tree | 37e983d92587ee30f93c35109200567e499ec491 /Bugzilla/Hook.pm | |
parent | 228c7bf9ea03a5faafe22f003e5d56da1b7b2162 (diff) | |
parent | 07c6bfa4cea83c8284b04add26729f552c93bafc (diff) | |
download | bugzilla-b9ce8358e9822243421a37548e3d1f0371b97455.tar.gz bugzilla-b9ce8358e9822243421a37548e3d1f0371b97455.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r-- | Bugzilla/Hook.pm | 114 |
1 files changed, 90 insertions, 24 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 564c5bc49..da17946c0 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -127,6 +127,30 @@ This describes what hooks exist in Bugzilla currently. They are mostly in alphabetical order, but some related hooks are near each other instead of being alphabetical. +=head2 admin_editusers_action + +This hook allows you to add additional actions to the admin Users page. + +Params: + +=over + +=item C<vars> + +You can add as many new key/value pairs as you want to this hashref. +It will be passed to the template. + +=item C<action> + +A text which indicates the different behaviors that editusers.cgi will have. +With this hook you can change the behavior of an action or add new actions. + +=item C<user> + +This is a Bugzilla::User object of the user. + +=back + =head2 attachment_process_data This happens at the very beginning process of the attachment creation. @@ -432,6 +456,41 @@ The definition is structured as: =back +=head2 buglist_column_joins + +This allows you to join additional tables to display additional columns +in buglists. This hook is generally used in combination with the +C<buglist_columns> hook. + +Params: + +=over + +=item C<column_joins> - A hashref containing data to return back to +L<Bugzilla::Search>. This hashref contains names of the columns as keys and +a hashref about table to join as values. This hashref has the following keys: + +=over + +=item C<table> - The name of the additional table to join. + +=item C<as> - (optional) The alias used for the additional table. This alias +must not conflict with an existing alias already used in the query. + +=item C<from> - (optional) The name of the column in the C<bugs> table which +the additional table should be linked to. If omitted, C<bug_id> will be used. + +=item C<to> - (optional) The name of the column in the additional table which +should be linked to the column in the C<bugs> table, see C<from> above. +If omitted, C<bug_id> will be used. + +=item C<join> - (optional) Either INNER or LEFT. Determine how the additional +table should be joined with the C<bugs> table. If omitted, LEFT is used. + +=back + +=back + =head2 search_operator_field_override This allows you to modify L<Bugzilla::Search/OPERATOR_FIELD_OVERRIDE>, @@ -628,6 +687,37 @@ Params: =back +=head2 error_catch + +This hook allows extensions to catch errors thrown by Bugzilla and +take the appropriate actions. + +Params: + +=over + +=item C<error> + +A string representing the error code thrown by Bugzilla. This string +matches the C<error> variable in C<global/user-error.html.tmpl> and +C<global/code-error.html.tmpl>. + +=item C<message> + +If the error mode is set to C<ERROR_MODE_WEBPAGE>, you get a reference to +the whole HTML page with the error message in it, including its header and +footer. If you need to extract the error message itself, you can do it by +looking at the content of the table cell whose ID is C<error_msg>. +If the error mode is not set to C<ERROR_MODE_WEBPAGE>, you get a reference +to the error message itself. + +=item C<vars> + +This hash contains all the data passed to the error template. Its content +depends on the error thrown. + +=back + =head2 flag_end_of_update This happens at the end of L<Bugzilla::Flag/update_flags>, after all other @@ -1354,30 +1444,6 @@ name), you can get it from here. =back -=head2 admin_editusers_action - -This hook allows you to add additional actions to the admin Users page. - -Params: - -=over - -=item C<vars> - -You can add as many new key/value pairs as you want to this hashref. -It will be passed to the template. - -=item C<action> - -A text which indicates the different behaviors that edit_users.cgi will have. -With this hook you can change the behavior of an action or add new actions. - -=item C<user> - -This is a Bugzilla::User object of the user. - -=back - =head2 user_preferences This hook allows you to add additional panels to the User Preferences page, |