Roxen.git
/
server
/
config_interface
/
sites
/
add_module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/config_interface/sites/add_module.pike:263:
} License.Key license_key = conf->getvar("license")->get_key(); array(RoxenModule) locked_modules = ({}); foreach( sort(indices(classes)), string c ) { mixed r; if( c == "" ) continue;
-
if( (r = class_visible( c, classes[c]->doc, id )) && r[0] )
+
if( (r = class_visible( c, classes[c]->doc,
sizeof(classes[c]->modules),
id )) &&
+
r[0] )
{ res += r[1]; array m = classes[c]->modules; array q = m->get_name(); sort( q, m ); foreach(m, object q) { if( q->get_description() == "Undocumented" && q->type == 0 ) continue;
Roxen.git/server/config_interface/sites/add_module.pike:354:
LOCALE(266, "Will be loaded from: ")+module->filename ); } else { if( block == module ) return ""; return ""; } }; }
-
array(int|string) class_visible_normal( string c, string d, RequestID id )
+
array(int|string) class_visible_normal( string c, string d,
int size,
+
RequestID id )
{ int x; string header = ("<tr><td colspan='2'><table width='100%' " "cellspacing='0' border='0' cellpadding='3' " "bgcolor='&usr.content-titlebg;'><tr><td>"); if( id->variables->unfolded == c ) { header+=("<a name="+Roxen.http_encode_string(c)+ "></a><gbutton " "href='add_module.pike?config=&form.config;"
Roxen.git/server/config_interface/sites/add_module.pike:431:
module->get_description(), LOCALE(266, "Will be loaded from: ")+module->filename ); } else { if( block == module ) return ""; return ""; } }
-
array(int|string) class_visible_faster( string c, string d, RequestID id )
+
array(int|string) class_visible_faster( string c, string d,
int size,
+
RequestID id )
{ int x; string header = ("<tr><td colspan='2'><table width='100%' cellspacing='0' " "border='0' cellpadding='3' bgcolor='&usr.content-titlebg;'>" "<tr><td>"); if( id->variables->unfolded == c ) { header+=("<a name="+Roxen.http_encode_string(c)+ "></a><gbutton dim='1'> "+LOCALE(267, "View")+" </gbutton>" "<tr><td><submit-gbutton> "+LOCALE(251, "Add Module")+
Roxen.git/server/config_interface/sites/add_module.pike:475:
"<table>"; string desc, err; [desc,err] = get_module_list( describe_module_faster, class_visible_faster, id ); content += (desc+"</table></form>"+err); return page_base( id, content ); } int first;
-
array(int|string) class_visible_compact( string c, string d, RequestID id )
+
array(int|string) class_visible_compact( string c, string d,
int size,
+
RequestID id )
{ string res=""; if(first++)
-
res = "</select><br /><submit-gbutton> "+LOCALE(251, "Add Module")+" </submit-gbutton> ";
+
res = "</select><br /><submit-gbutton> "+LOCALE(251, "Add Module")+
+
" </submit-gbutton> ";
res += "<p><a name="+Roxen.http_encode_string(c)+
-
"></a><font size='+2'>"+c+"</font><br />"+d+"<p><select multiple name='module_to_add'>";
+
"></a><font size='+2'>"+c+"</font><br />"+d+"<p>
"
+
"
<select
size='"+size+"'
multiple name='module_to_add'
style='font-family: monospace'
>";
return ({ 1, res }); } string describe_module_compact( object module, object block ) { if(!block) { //string modname = strip_leading (module->get_name()); string modname = module->get_name(); return "<option value='"+module->sname+"'>"+
-
Roxen.html_encode_string(
-
modname
+ "
\0240
" * max (0, (int) ((
40
- sizeof (modname))
* 1.4
)) +
-
" (" + module->sname + ")"
)
+
+
Roxen.html_encode_string(
modname)
+
+ "
" * max (0, (int) ((
49
- sizeof (modname)))) +
+
" (" +
Roxen.html_encode_string(
module->sname
)
+ ")"+
"</option>\n"; } return ""; } string page_compact( RequestID id ) { first=0; string desc, err; [desc,err] = get_module_list( describe_module_compact,
Roxen.git/server/config_interface/sites/add_module.pike:551:
//sscanf(in, "%*s: %s", in); return in; }), mods); string res = ""; mixed r; License.Key license_key = conf->getvar("license")->get_key(); array(RoxenModule) locked_modules = ({}); if( (r = class_visible_compact( LOCALE(258,"Add module"),
-
LOCALE(273,"Select one or several modules to add.")
-
, id )) && r[0] ) {
+
LOCALE(273,"Select one or several modules to add.")
,
+
sizeof(mods)
, id )) && r[0] ) {
res += r[1]; foreach(mods, object q) { if( (!q->get_description() || (q->get_description() == "Undocumented")) && q->type == 0 ) continue; object b = module_nomore(q->sname, q, conf); if( !b && q->locked && (!license_key || !q->unlocked(license_key)) ) { locked_modules += ({ q });