Branch: Tag:

2003-08-07

2003-08-07 12:52:04 by Jonas Wallden <jonasw@roxen.com>

Fix for documentation extraction from files using local #include statements.

Rev: server/base_server/module.pike:1.143

1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: module.pike,v 1.142 2003/07/07 18:15:43 mast Exp $ + // $Id: module.pike,v 1.143 2003/08/07 12:52:04 jonasw Exp $      #include <module_constants.h>   #include <module.h>
701:   {    Stdio.File file=Stdio.File();    if(!file->open(path,"r")) return 0; -  if(index[sizeof(index)-2..sizeof(index)-1]=="()") { -  return compile_string((pre||"")+file->read())[index[..sizeof(index)-3]](); +  if(has_suffix(index, "()")) +  index = index[..sizeof(index) - 3]; +  +  // Pass path to original file so that include statements for local files +  // work correctly. +  return compile_string((pre || "") + file->read(), path)[index];   } -  return compile_string((pre||"")+file->read())[index]; - } +       static private mapping __my_tables = ([]);