[ljcom] r11036: LJSUP-9789 (create a widget and a templa...
Committer: ailyin
LJSUP-9789 (create a widget and a template for error pages)U trunk/cgi-bin/LJ/Widget/ErrorPage.pm
Modified: trunk/cgi-bin/LJ/Widget/ErrorPage.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/ErrorPage.pm 2011-09-27 09:32:16 UTC (rev 11035)
+++ trunk/cgi-bin/LJ/Widget/ErrorPage.pm 2011-09-27 09:40:03 UTC (rev 11036)
@@ -275,13 +275,13 @@
sub render {
my ( $class, %args ) = @_;
- my $error_type = $args{'error_type'};
+ my $error_type = $args{'error_type'} || '_default';
my $uri = $args{'uri'};
my $remote = $args{'remote'};
my $active_journal_username = $args{'active_journal_username'};
my $journal;
- if ( $active_journal_username ne '' ) {
+ if ( $active_journal_username && $active_journal_username ne '' ) {
$journal = LJ::load_user($active_journal_username);
}
@@ -292,6 +292,7 @@
'remote_equals_journal' => LJ::u_equals( $remote, $journal ),
);
+ LJ::Lang::current_scope('/error-page.bml');
my $data = $handler->(%handler_args);
my $template = LJ::HTML::Template->new(
