Roxen.git / server / base_server / mainconfig.pike

version» Context lines:

Roxen.git/server/base_server/mainconfig.pike:1:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.86 1997/12/15 02:04:49 peter Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.87 1997/12/15 20:06:19 peter Exp $";   //inherit "roxenlib";   import Image;      inherit "config/draw_things";      import Array;   import Stdio;      string status_row(object node);   string display_tabular_header(object node);
Roxen.git/server/base_server/mainconfig.pike:568:   }      string describe_config_modules(array mods)   {    string res = "This configuration template adds the following modules:<p><ul>";    if(!mods||!sizeof(mods)) return "This configuration template adds no modules";       foreach(mods, string mod)    {    sscanf(mod, "%s#", mod); +  if(!roxen->allmodules) +  { +  werror("CONFIG: Rescanning modules (doc string).\n"); +  roxen->rescan_modules(); +  werror("CONFIG: Done.\n"); +  }    if(!roxen->allmodules[mod]) res += "<li>The unknown modules '"+mod+"'\n";    else res += "<li>"+roxen->allmodules[mod][0]+"\n";    }    return res+"</ul>";   }      string configuration_docs()   {    string res="";    foreach(get_dir("server_templates"), string c)    { -  catch { -  if(c[-1]=='e' || c[0]!='#') +  if( c-".pike" != c )    res += ("<dt><b>"+get_template(c)->name+"</b>\n"+    "<dd>"+get_template(c)->desc+"<br>\n"+    describe_config_modules(get_template(c)->modules) + "\n"); -  }; +     }    return res;   }      string new_configuration_form()   {    return (default_head("") + status_row(root) +    "<h2>Add a new virtual server</h2>\n"    "<table bgcolor=#000000><tr><td >\n"    "<table cellpadding=3 cellspacing=1 bgcolor=lightblue><tr><td>\n"
Roxen.git/server/base_server/mainconfig.pike:759:       varname=indices(id->variables)[0];       return new_module_copy(node, varname, id);   }      string ot;   object oT;   object get_template(string t)   { -  t-=".pike"; +     if(ot==t) return oT; ot=t; -  return (oT=compile_file("server_templates/"+t+".pike")()); +  return (oT = compile_file("server_templates/"+t)());   }      int check_config_name(string name)   {    if(strlen(name) && name[-1] == '~') name = "";    if(search(name, "/")!= -1) return 1;       foreach(roxen->configurations, object c)    if(lower_case(c->name) == lower_case(name))    return 1;