Added more i18n labels to HttpProxy so that error messages can be internationalized.
Added skeletal documentation for the new RSS modules. Fixed a bug in Search/Index.pm that was giving a warning during syntax checks.
This commit is contained in:
parent
7532d07507
commit
91ee102c5f
7 changed files with 211 additions and 5 deletions
|
|
@ -230,6 +230,7 @@ sub view {
|
|||
my $header;
|
||||
my $proxiedUrl;
|
||||
|
||||
my $i18n = WebGUI::International->new($self->session, 'Asset_HttpProxy');
|
||||
|
||||
### Set up a cookie jar
|
||||
my $cookiebox = $self->session->url->escape($self->session->var->get("sessionId"));
|
||||
|
|
@ -284,7 +285,7 @@ sub view {
|
|||
if ($self->get("followExternal")==0
|
||||
&& (URI->new($self->get('proxiedUrl'))->host) ne (URI->new($proxiedUrl)->host) ) {
|
||||
$var{header} = "text/html";
|
||||
$var{content} = "<h1>You are not allowed to leave ".$self->get("proxiedUrl")."</h1>";
|
||||
$var{content} = sprintf $i18n->get('may not leave error message'), $self->get("proxiedUrl");
|
||||
last;
|
||||
}
|
||||
|
||||
|
|
@ -383,8 +384,7 @@ sub view {
|
|||
|
||||
if ($var{content} =~ /<frame/gis) {
|
||||
$var{header} = "text/html";
|
||||
$var{content} = "<h1>HttpProxy: Can't display frames</h1>
|
||||
Try fetching it directly <a href='$proxiedUrl'>here.</a>";
|
||||
$var{content} = sprintf $i18n->get('no frame error message'), $proxiedUrl;
|
||||
} else {
|
||||
$var{content} =~ s/\<style.*?\/style\>//isg if ($self->get("removeStyle"));
|
||||
$var{content} = WebGUI::HTML::cleanSegment($var{content});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue