Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike: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>   #include <request_trace.h>      constant __pragma_save_parent__ = 1;      inherit "basic_defvar";   mapping(string:array(int)) error_log=([]);   
Roxen.git/server/base_server/module.pike:694:    module_tag_set =    (this_object()->ModuleTagSet || RXML.TagSet) (this_object(), "", tags);    }    return module_tag_set;   }      mixed get_value_from_file(string path, string index, void|string pre)   {    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 = ([]);      array(mapping(string:mixed)) sql_query( string query, mixed ... args )   //! Do a SQL-query using @[get_my_sql], the table names in the query   //! should be written as &table; instead of table. As an example, if   //! the tables 'meta' and 'data' have been created with create_tables   //! or get_my_table, this query will work:   //!   //! SELECT &meta;.id AS id, &data;.data as DATA