From: Bill Erickson Date: Fri, 21 Jan 2011 21:08:50 +0000 (-0500) Subject: move template finder in front of context loader, so that context loader has access... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7ec6ca7d940cb88f919d403d7c60ba34ce5f5e01;p=evergreen%2Fequinox.git move template finder in front of context loader, so that context loader has access to path-based page arguments --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 44c6e6b692..cc8d2258d1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -35,14 +35,16 @@ sub handler { my $base = $ctx->{base_path}; $r->content_type('text/html; encoding=utf8'); - my $stat = run_context_loader($r, $ctx); - return $stat unless $stat == Apache2::Const::OK; my($template, $page_args, $as_xml) = find_template($r, $base, $ctx); + $ctx->{page_args} = $page_args; + + my $stat = run_context_loader($r, $ctx); + + return $stat unless $stat == Apache2::Const::OK; return Apache2::Const::DECLINED unless $template; $template = $ctx->{skin} . "/$template"; - $ctx->{page_args} = $page_args; my $tt = Template->new({ OUTPUT => ($as_xml) ? sub { parse_as_xml($r, $ctx, @_); } : $r,