Roxen.git/
server/
base_server/
mainconfig.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1997-08-13
1997-08-13 22:06:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>
39ff57f882f52fe2118254b04d7272aeaee91b80 (
22
lines) (+
16
/-
6
)
[
Show
|
Annotate
]
Branch:
5.2
Now selects a default server template.
Rev: server/base_server/mainconfig.pike:1.66
1:
inherit "config/builders";
-
string cvs_version = "$Id: mainconfig.pike,v 1.
65
1997/08/13
21
:
37
:
32
per
Exp $";
+
string cvs_version = "$Id: mainconfig.pike,v 1.
66
1997/08/13
22
:
06
:
05
grubba
Exp $";
inherit "roxenlib"; inherit "config/draw_things";
9:
string display_tabular_header(object node); object get_template(string t);
-
/* Work-around for Simulate.perror */
+
/* Work-around for Simulate.perror */
#
#define perror roxen_perror #include <confignode.h>
531:
string res=""; foreach(get_dir("server_templates"), string c) {
-
catch {
-
if(c[-1]=='e' || c[0]!='#')
-
res += "<option value=\""
+c+"\"
>"
+get_template(
c
)
->
name;
-
}
;
+
array err;
+
if (err =
catch {
+
if(c[-1]=='e' || c[0]!='#')
{
+
object o = get_template(c);
+
res +=
sprintf(
"<option value=\"
%s\
"
%s
>
%s\n
"
,
+
c,
+
(
o
->
selected?" selected":""),
+
o->name)
;
}
-
+
}) {
+
report_error(sprintf("Error initializing server template \"%s\"\n"
+
"%s\n", c, describe_backtrace(err)));
+
}
+
}
return res; }