From 998da3e93682fa8346e08e0bdfde12c330c81b72 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 21 Jan 2011 16:08:50 -0500 Subject: [PATCH] move template finder in front of context loader, so that context loader has access to path-based page arguments --- Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm index 4980f792a5..6d38a83b75 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/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, -- 2.43.2