X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=e74f44eb1012d7e25541eb312259745ba0dd1d47;hp=67c1d9f7ce1b1221e113da1a726e5bc146792d2c;hb=83053569b3d965924e2e1d4f5b199609ec7c29af;hpb=38eb380a88ea7a130e83b77ff9c51ef6967b707b diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 67c1d9f7c..e74f44eb1 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -137,6 +137,8 @@ if ( -e $addl_handler_use_file ) { use FS::TicketSystem; use FS::NetworkMonitoringSystem; use FS::Tron qw( tron_lint ); + use FS::Locales; + use FS::L10N; use FS::agent; use FS::agent_type; @@ -406,6 +408,11 @@ if ( -e $addl_handler_use_file ) { $m->comp('/elements/errorpage-popup.html', @_); } + sub mt { + use vars qw($lh); + $lh->maketext(@_); + } + sub redirect { my( $location ) = @_; use vars qw($m); @@ -526,13 +533,15 @@ sub mason_interps { ${$_[0]} = "'". ${$_[0]}. "'"; }; + my $defang_sub = sub { + ${$_[0]} = $html_defang->defang(${$_[0]}); + }; + my $fs_interp = new HTML::Mason::Interp ( %interp, comp_root => $fs_comp_root, - escape_flags => { 'js_string' => $js_string_sub, - 'defang' => sub { - ${$_[0]} = $html_defang->defang(${$_[0]}); - }, + escape_flags => { 'js_string' => $js_string_sub, + 'defang' => $defang_sub, }, compiler => HTML::Mason::Compiler::ToObject->new( allow_globals => [qw(%session)],