From: Bill Erickson Date: Thu, 15 May 2014 15:22:16 +0000 (-0400) Subject: LP#1306675 TPAC maketext default handler X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3f85d1c7f6781c0f5cded16206d27d3868781846;p=Evergreen.git LP#1306675 TPAC maketext default handler Fall back to an unitialized maketext handler, which defaults to the template language, when OpenILS::WWW::EGWeb::I18N->get_handle fails to return a response. Note that why get_handle() returns undef is not yet known. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 57cb02b4dd..a885153c41 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -90,7 +90,8 @@ sub set_text_handler { $r->log->debug("egweb: messages locale = $locale"); return sub { - my $lh = OpenILS::WWW::EGWeb::I18N->get_handle($locale); + my $lh = OpenILS::WWW::EGWeb::I18N->get_handle($locale) + || OpenILS::WWW::EGWeb::I18N->new; return $lh->maketext(@_); }; }