Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:1:
-
/* $Id: module.pike,v 1.
67
2000/01/18 14:
07
:
35
noring
Exp $ */
+
/* $Id: module.pike,v 1.
68
2000/01/18 14:
56
:
20
mast
Exp $ */
#include <module.h> #include <request_trace.h> mapping (string:mixed *) variables=([]); RoxenModule this = this_object(); mapping(string:array(int)) error_log=([]); constant is_module = 1; constant module_type = MODULE_ZERO; constant module_name = "Unnamed module";
Roxen.git/server/base_server/module.pike:650:
{ mapping m = ([]); foreach(glob("if_*", indices( this_object())), string q) if(functionp( this_object()[q] )) m[replace(q[3..], "_", "-")] = this_object()[q]; return m; } RXML.TagSet query_tag_set() {
-
return
-
my_configuration
(
)->module_tag_sets[this_object()]
||
-
(this_
object
(
)
->ModuleTagSet
||
RXML.TagSet) (
-
module_identifier(),
+
array
(
function
|
program
|object)
tags
=
filter (rows (this_object(), glob ("Tag*", indices (this_object()))),
-
functionp
)());
+
functionp);
+
for (int i = 0; i < sizeof (tags
)
; i++)
+
if
(
programp (tags[i]
))
+
if (!tags[i]->is_RXML_Tag) tags[i] = 0
;
+
else tags[i] = tags[i]();
+
else {
+
tags[i] = tags[i]();
+
// Bogosity: The check is really a little too late here..
+
if (!tags[i]->is_RXML_Tag) tags[i] = 0;
}
-
+
tags -= ({0});
+
return
+
my_configuration()->module_tag_sets[this_object()] ||
+
(this_object()->ModuleTagSet || RXML.TagSet) (module_identifier(), tags);
+
}
mixed get_value_from_file(string path, string index, void|string pre) { Stdio.File file=Stdio.File(); if(!file->open(path,"r")) return 0; if(index[sizeof(index)-2..sizeof(index)-1]=="()") { return compile_string((pre||"")+file->read())[index[..sizeof(index)-3]](); } return compile_string((pre||"")+file->read())[index]; }