Roxen.git
/
server
/
base_server
/
mainconfig.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/mainconfig.pike:1:
inherit "config/builders";
-
string cvs_version = "$Id: mainconfig.pike,v 1.
93
1998/02/
05
01
:
09
:
55
grubba
Exp $";
+
string cvs_version = "$Id: mainconfig.pike,v 1.
94
1998/02/
10
18
:
36
:
05
per
Exp $";
//inherit "roxenlib"; inherit "config/draw_things";
-
import Array;
-
import Stdio;
+
//
import Array;
+
//
import Stdio;
string status_row(object node); string display_tabular_header(object node); object get_template(string t); /* Work-around for Simulate.perror */ #define perror roxen_perror #include <confignode.h> #include <module.h>
Roxen.git/server/base_server/mainconfig.pike:365:
} mixed decode_form_result(string var, int type, object node, mapping allvars) { switch(type) { case TYPE_CUSTOM: return node->data[ VAR_MISC ][2]( var, type, node, allvars ); case TYPE_MODULE_LIST:
-
return map(var/"\000", find_module);
+
return
Array.
map(var/"\000", find_module);
case TYPE_MODULE: return find_module(var, node->config()); case TYPE_PORTS: /* Encoded like this: new_port --> Add a new port ok[_<ID>] --> Save the value for all or one port
Roxen.git/server/base_server/mainconfig.pike:416:
"key-file "+allvars["key_"+i]+"\n":"")+ (allvars["cert_"+i]&&strlen(allvars["cert_"+i])? "cert-file "+allvars["cert_"+i]+"\n":""); } else // Delete this port. op[i]=0; } return op - ({ 0 }); case TYPE_DIR_LIST: array foo;
-
foo=map((var-" ")/",", lambda(string var, object node) {
-
if (!strlen( var ) || file_size( var ) != -2)
+
foo=
Array.
map((var-" ")/",", lambda(string var, object node) {
+
if (!strlen( var ) ||
Stdio.
file_size( var ) != -2)
{ if(node->error) node->error += ", " +var + " is not a directory"; else node->error = var + " is not a directory"; return 0; } if(var[-1] != '/') return var + "/"; return var;
Roxen.git/server/base_server/mainconfig.pike:483:
{ node->error= var + " is not a arbitary precision floating point number"; return 0; } return tmp; case TYPE_INT_LIST: if(node->data[VAR_MISC]) return (int)var; else
-
return map((var-" ")/",", lambda(string s){
+
return
Array.
map((var-" ")/",", lambda(string s){
return (int)s; }); case TYPE_STRING_LIST: if(node->data[VAR_MISC]) return var; else return (var-" ")/",";
Roxen.git/server/base_server/mainconfig.pike:720:
if(!roxen->allmodules || sizeof(id->pragma)) { werror("CONFIG: Rescanning modules.\n"); roxen->current_configuration = node->config(); roxen->rescan_modules(); roxen->current_configuration = 0; werror("CONFIG: Done.\n"); } a=roxen->allmodules;
-
mods=sort_array(indices(a), lambda(string a, string b, mapping m) {
+
mods=
Array.
sort_array(indices(a), lambda(string a, string b, mapping m) {
return m[a][0] > m[b][0]; }, a); res = ({default_head("Add a module")+"\n\n"+ status_row(node)+ // display_tabular_header(node)+ "<table><tr><td> <td><h2>Select a module to add" " from the list below, click on it's header to add it.</h2>" }); foreach(mods, q)
Roxen.git/server/base_server/mainconfig.pike:942:
n2->data[VAR_VALUE] = roxen->QUERY(ConfigurationUser); n2->change(1); root->save(); return std_redirect(root, id); } } res = default_head("Welcome to Roxen Challenger");
-
res += read_bytes("etc/welcome.html");
+
res +=
Stdio.
read_bytes("etc/welcome.html");
if(error && strlen(error)) res += "<blockquote>\n<p><b>"+error+"</b>"; res += ("<table border=0 bgcolor=black><tr><td><table cellspacing=0 border=0 cellpadding=3 bgcolor=#e0e0ff>" "<tr><td colspan=2><center><h1>Please complete this form.</h1></center>" "</td></tr>" "<form action=\"/(initial)/Globals/\">" "<tr><td align=right>User name</td><td><input name=user type=string></td></tr>\n" "<tr><td align=right>Password</td><td><input name=pass type=password></td></tr>\n" "<tr><td align=right>Again</td><td><input name=pass2 type=password></td></tr>\n"
Roxen.git/server/base_server/mainconfig.pike:1294:
int full_version=0; catch { if (sizeof(indices(master()->resolv("_Crypto")))) { full_version = 1; } }; return http_string_answer(default_head("Roxen Challenger")+ status_row(root)+ display_tabular_header(root)+
-
read_bytes(full_version?"etc/config.html":
+
Stdio.
read_bytes(full_version?"etc/config.html":
"etc/config.int.html"), "text/html"); } if(sizeof(id->prestate)) { switch(indices(id->prestate)[0]) { // It is possible to mark variables as 'VAR_EXPERT', this // will make it impossible to configure them whithout the // 'expert' mode. It can be useful.
Roxen.git/server/base_server/mainconfig.pike:1490:
for(i=0; i<sizeof(roxen->configurations); i++) if(roxen->configurations[i] == o->data) break; if(i==sizeof(roxen->configurations)) error("Configuration not found.\n"); roxen->remove_configuration(o->data->name); if(roxen->configurations[i]->ports_open)
-
map(values(roxen->configurations[i]->ports_open), destruct);
+
Array.
map(values(roxen->configurations[i]->ports_open), destruct);
destruct(roxen->configurations[i]); roxen->configurations = roxen->configurations[..i-1] + roxen->configurations[i+1..]; o->change(-o->changed); o->dest(); break; case NODE_MODULE_COPY_VARIABLE: