From: ivan Date: Thu, 30 Dec 2004 09:59:02 +0000 (+0000) Subject: kludge to fix nested includes with Apache::ASP... dunno how much longer i want to... X-Git-Tag: BEFORE_FINAL_MASONIZE~748 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=acf0702e4f3bf675deeec34bfbe70928460e7cdf kludge to fix nested includes with Apache::ASP... dunno how much longer i want to support that, should just switch to Mason --- diff --git a/htetc/global.asa b/htetc/global.asa index 612f6f4af..c5f4ee099 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -206,9 +206,16 @@ sub sprintAutoProfile { } sub include { - ( my $file = shift ) =~ s(^/)(%%%FREESIDE_DOCUMENT_ROOT%%%/); + my $file = shift; + my $pop = 0; + if ( $file =~ m(^([^/].*)/[^/]+) ) { + push @{$Response->{asp}{includes_dir}}, "./$1"; + $pop = 1; + } + $file =~ s(^/)(%%%FREESIDE_DOCUMENT_ROOT%%%/); #broken in 5.005# ${$Response->TrapInclude($file, @_)}; my $ref = $Response->TrapInclude($file, @_); + pop @{$Response->{asp}{includes_dir}} if $pop; $$ref; }