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=refs%2Fheads%2Fuser%2Fberick%2Flp1306675-tpac-maketext-failure;p=working%2FEvergreen.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 --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 8b72e537eb..0f9e93e859 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(@_); }; }