Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - // - // German translation by Kai Voigt +     - constant cvs_version = "$Id: configuration.pike,v 1.326 2000/07/23 15:16:28 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.327 2000/07/26 15:14:35 jhs Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:2048: Inside #if defined(MODULE_LEVEL_SECURITY)
   {   #ifdef MODULE_LEVEL_SECURITY    if(check_security(tmp[1], id)) continue;   #endif    if(s=function_object(tmp[1])->real_file(file[strlen(loc)..], id))    return s;    }    }   }    - // Convenience functions used in quite a lot of modules. Tries to - // read a file into memory, and then returns the resulting string. -  - // NOTE: A 'file' can be a cgi script, which will be executed, resulting in - // a horrible delay. - // - // Unless the not_internal flag is set, this tries to get an external - // or internal file. Here "internal" means a file that never should be - // sent directly as a request response. E.g. an internal redirect to a - // different file is still considered "external" since its contents is - // sent directly to the client. Internal requests are recognized by - // the id->misc->internal_get flag. +    int|string try_get_file(string s, RequestID id,    int|void status, int|void nocache,    int|void not_internal) -  + //! Convenience function used in quite a lot of modules. Tries to read + //! a file into memory, and then returns the resulting string. + //! + //! NOTE: A 'file' can be a cgi script, which will be executed, + //! resulting in a horrible delay. + //! + //! Unless the not_internal flag is set, this tries to get an external + //! or internal file. Here "internal" means a file that never should be + //! sent directly as a request response. E.g. an internal redirect to a + //! different file is still considered "external" since its contents is + //! sent directly to the client. Internal requests are recognized by + //! the id->misc->internal_get flag being non-zero.   {    string res, q, cache_key;    RequestID fake_id;    mapping m;       if(!objectp(id))    error("No ID passed to 'try_get_file'\n");       // id->misc->common makes it possible to pass information to    // the originating request.
Roxen.git/server/base_server/configuration.pike:2180:    registered_urls -= ({ url });    roxenp()->unregister_url( url );    }   }      void save_me()   {    save_one( 0 );   }    - // Save this configuration. If all is included, save all configuration - // global variables as well, otherwise only all module variables. +    void save(int|void all) -  + //! Save this configuration. If all is included, save all configuration + //! global variables as well, otherwise only all module variables.   {    if(all)    {    store("spider#0", variables, 0, this_object());    start(2);    }       foreach(indices(modules), string modname)    {    foreach(indices(modules[modname]->copies), int i)    {    store(modname+"#"+i, modules[modname]->copies[i]->query(), 0, this_object());    modules[modname]->copies[i]->start(2, this_object());    }    }    invalidate_cache();   }    - // Save all variables in _one_ module. +    int save_one( RoxenModule o ) -  + //! Save all variables in a given module.   {    mapping mod;    if(!o)    {    store("spider#0", variables, 0, this_object());    start(2);    return 1;    }    string q = otomod[ o ];    if( !q )