diff options
author | lpsolit%gmail.com <> | 2005-06-11 04:11:46 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-06-11 04:11:46 +0200 |
commit | a41ac397cb8755475aaeb9221f5de94b90f3df75 (patch) | |
tree | 68ea4875184247250043a79769166555da75b543 /template/en | |
parent | be7ed7144156d09c7f4ad4c23c82eeb3e716b85e (diff) | |
download | bugzilla-a41ac397cb8755475aaeb9221f5de94b90f3df75.tar.gz bugzilla-a41ac397cb8755475aaeb9221f5de94b90f3df75.tar.xz |
Bug 296214: Add a hook into user-error.html.tmpl to allow user-extendable error messages - Patch by Dennis Melentyev <dennis.melentyev@infopulse.com.ua> r=joel a=myk
Diffstat (limited to 'template/en')
-rw-r--r-- | template/en/default/global/user-error.html.tmpl | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 1aa55be58..3d7599711 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -31,6 +31,12 @@ # # Note that you must explicitly filter every single template variable # in this file; if you do not wish to change it, use the "none" filter. + # + # Extension- or custom-specific error handling can be easily added + # via hooks: just place your <extension>-errors.html.tmpl into + # template/en/extension/hook/global/user-error.html.tmpl/errors/ + # Note: be aware of uniqueness of error string parameter value, since + # nobody can guarantee the hook files processing order in the future #%] [% PROCESS global/variables.none.tmpl %] @@ -1111,10 +1117,18 @@ The file you are trying to attach is empty! [% ELSE %] - [% title = "Error string not found" %] - The user error string <code>[% error FILTER html %]</code> was not found. - Please send email to [% Param("maintainer") %] describing the steps taken - to obtain this message. + + [%# Try to find hooked error messages %] + [% error_message = Hook.process("errors") %] + + [% IF not error_message %] + [% title = "Error string not found" %] + The user error string <code>[% error FILTER html %]</code> was not found. + Please send email to [% Param("maintainer") %] describing the steps taken + to obtain this message. + [% ELSE %] + [% error_message FILTER none %] + [% END %] [% END %] [% END %] |