kludge to fix nested includes with Apache::ASP... dunno how much longer i want to...
authorivan <ivan>
Thu, 30 Dec 2004 09:59:02 +0000 (09:59 +0000)
committerivan <ivan>
Thu, 30 Dec 2004 09:59:02 +0000 (09:59 +0000)
htetc/global.asa

index 612f6f4..c5f4ee0 100644 (file)
@@ -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;
 }