[Rt-commit] r12872 - in rt/branches/3.8-TESTING: lib/RT/Interface share/html/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Wed Jun 4 13:03:37 EDT 2008
Author: sartak
Date: Wed Jun 4 13:03:32 2008
New Revision: 12872
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
rt/branches/3.8-TESTING/share/html/Elements/Error
Log:
r61596 at onn: sartak | 2008-06-04 12:58:43 -0400
Allow Abort to pass arbitrary arguments to the Error components, and add a SuppressHeader argument to Elements/Error
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm Wed Jun 4 13:03:32 2008
@@ -297,15 +297,17 @@
# {{{ sub Abort
# Error - calls Error and aborts
sub Abort {
+ my $why = shift;
+ my %args = @_;
if ($session{'ErrorDocument'} &&
$session{'ErrorDocumentType'}) {
$r->content_type($session{'ErrorDocumentType'});
- $m->comp($session{'ErrorDocument'} , Why => shift);
+ $m->comp($session{'ErrorDocument'} , Why => $why, %args);
$m->abort;
}
else {
- $m->comp("/Elements/Error" , Why => shift);
+ $m->comp("/Elements/Error" , Why => $why, %args);
$m->abort;
}
}
Modified: rt/branches/3.8-TESTING/share/html/Elements/Error
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/Error (original)
+++ rt/branches/3.8-TESTING/share/html/Elements/Error Wed Jun 4 13:03:32 2008
@@ -46,8 +46,12 @@
%#
%# END BPS TAGGED BLOCK }}}
% $m->callback( %ARGS, error => $error );
+
+% unless ($SuppressHeader) {
<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &>
<& /Elements/Tabs, Title => $Title &>
+% }
+
<div class="error">
<%$Why%>
<br />
@@ -63,7 +67,8 @@
$Code => undef
$Details => ''
$Title => loc("RT Error")
-$Why => loc("the calling component did not specify why")
+$Why => loc("the calling component did not specify why"),
+$SuppressHeader => 0,
</%args>
<%INIT>
More information about the Rt-commit
mailing list