X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FError;h=63b81b11fe382af90c7b678cfe09fd08e70971b6;hp=8384320691ce83193f864f6fb7450d1d799b3e47;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=7588a4ac90a9b07c08a3107cd1107d773be1c991 diff --git a/rt/share/html/Elements/Error b/rt/share/html/Elements/Error index 838432069..63b81b11f 100755 --- a/rt/share/html/Elements/Error +++ b/rt/share/html/Elements/Error @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -48,7 +48,7 @@ % $m->callback( %ARGS, error => $error ); % unless ($SuppressHeader) { -<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &> +<& /Elements/Header, Title => $Title &> <& /Elements/Tabs &> % } @@ -60,14 +60,11 @@ <%$Details%> -<%cleanup> -$m->comp('/Elements/Footer'); -$m->abort(); - +<& /Elements/Footer &> +% $m->abort; <%args> $Actions => [] -$Code => undef $Details => '' $Title => loc("RT Error") $Why => loc("the calling component did not specify why"), @@ -75,17 +72,13 @@ $SuppressHeader => 0, <%INIT> -my $error = "WebRT: $Why"; +my $error = $Why; $error .= " ($Details)" if defined $Details && length $Details; -# TODO: Log::Dispatch isn't UTF-8 safe. Autrijus needs to talk to dave rolsky about getting this fixed -use Encode (); -Encode::_utf8_off($error); - -$RT::Logger->error($error); +$RT::Logger->error( $error ); if ( $session{'REST'} ) { - $r->content_type('text/plain'); + $r->content_type('text/plain; charset=utf-8'); $m->out( "Error: " . $Why . "\n" ); $m->out( $Details . "\n" ) if defined $Details && length $Details; $m->abort();