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 - 2000, Roxen IS. - // $Id: module.pike,v 1.106 2001/01/29 09:04:22 per Exp $ + // $Id: module.pike,v 1.107 2001/01/30 04:51:05 per Exp $      #include <module_constants.h>   #include <module.h>   #include <request_trace.h>      inherit "basic_defvar";   mapping(string:array(int)) error_log=([]);      constant is_module = 1;   // constant module_type = MODULE_ZERO;
Roxen.git/server/base_server/module.pike:155:      string status() {}      string info(Configuration conf)   {    return (this_object()->register_module()[2]);   }      string sname( )   { -  return (my_configuration()->name+"_"+ -  my_configuration()->otomod[ this_object() ]); +  return my_configuration()->otomod[ this_object() ];   }      ModuleInfo my_moduleinfo( )   //! Returns the associated @ref{ModuleInfo} object   {    string f = sname();    if( f ) return roxen.find_module( (f/"#")[0] );   }      void save_me()
Roxen.git/server/base_server/module.pike:538:   }      string my_db = "shared";   void set_my_db( string to )   {    my_db = to;   }      string get_my_table( string defenition )   { -  string res = replace(sname(),"#","_"); +  string res = _my_configuration->name+"_"+replace(sname(),"#","_");    Sql.Sql sql = get_my_sql();    if( !sql )    {    report_error("Failed to get SQL handle, permission denied for "+my_db+"\n");    return 0;    }       if( catch(sql->query( "SELECT * FROM "+res+" LIMIT 1" )) )    get_my_sql()->query( "CREATE TABLE "+res+" ("+defenition+")" );    return res;   }         Sql.Sql get_my_sql()   {    return DBManager.get( my_db, _my_configuration );   }