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:148:
sscanf( error, "%*[ \t]%s", error ); sscanf( error, "%s: %s", type, error ); if( by_module[ file ] ) by_module[ file ] += ({ ({ row*10000 + cnt++, row, type, error }) }); else by_module[ file ] = ({ ({ row*10000 + cnt++, row, type, error }) }); } }
-
string da_string = "";
+
string da_string = ""
,
+
divider
;
int header_added; foreach( sort((array)by_module), [string module, array errors] ) {
-
+
if (divider) {
+
da_string += divider;
+
divider = 0;
+
}
+
array res = ({ }); int remove_suspicious = 0; sort( errors ); foreach( errors, array e ) { if( e[2] == "Error" ) { remove_suspicious = 1; switch( e[3] ) {
Roxen.git/server/config_interface/sites/add_module.pike:211:
(X), \ LOCALE(253, "Reload")) if( !header_added++ ) { da_string += "<hr><a name='errors_and_warnings'></a>" "<h3>Compile errors and warnings</h3>" "<table>"; }
-
da_string += "<tr><td><
/td
>"
-
"<
td
colspan
='
3
'>"
+
da_string += "<tr>
"
+
"
<td
colspan='4'
>
"
+
"
<
div class='flex-row'
>"
+
"<
div
class
='
flex col-6
'>"
+ "<b>"
-
+ module_name_from_file(module)+"</b></
td
>"
-
+ "<
td
class='text-right'>"
+
+ module_name_from_file(module)+"</b></
div
>"
+
+ "<
div
class='
flex col-6
text-right'>"
+ trim_name(module)
-
+ " "+RELOAD(module)+"</
td
><
td
></td></tr>";
+
+ " "+RELOAD(module)+"</
div
>
"
+
"
<
/div
></td></tr>";
foreach( res, array e ) da_string +=
-
"<tr class'valign-top'>"
-
"<td></td>"
-
"<td
><img
src
='
/internal
-
roxen-unit
'
width='30' height='
1
' alt=''
/>"
-
"<
/
td
><td
align
='right'>"
-
"<tt>"+e
[
1
]+":</
tt></
td>
<td align='right'><tt>
"
+
-
he(e[2])+
"
:
<
/tt></
td>
<td><tt>
"+hc(e[3])+"</
tt></
td></tr>\n";
-
da_string += "<tr valign='top'><td colspan='5'> </td><td></td></tr>\n";
+
"<tr class
=
'valign-top
monospace
'>"
+
"<td
style='width:30px'
>
</td>"
+
"<td
class
='
text
-
right
'
>"+e[
1
]+":<
/
td
>"
+
"<td
class
='
text-
right
nowrap
'>"
+
he(e
[
2
]
)
+":</td>"
+
"<td>"+hc(e[3])+"</td></tr>\n";
-
+
divider = "<tr><td colspan='4'><hr></td></tr>";
} } if( strlen( da_string ) ) da_string += "</table>";
-
// "<pre>"+Roxen.html_encode_string( sprintf( "%O", by_module ) )+"</pre>";
+
return da_string + format_locked_modules(locked_modules); } string format_locked_modules(array(ModuleInfo) locked_modules) { if(!sizeof(locked_modules)) return ""; return
-
"<
p class='large'
>Locked modules</
p
>\n"
+
"<
h3
>Locked modules</
h3
>\n"
"<p>These modules are locked and can not be enabled because they are " "not part of the license key for this configuration.</p>\n"
-
"<div class='notify error'>"+
+
"<div class='notify error
no-margin-top
'>"+
(((array(string))locked_modules->get_name())*"<br />\n")+"</div>"; } array(string) get_module_list( function describe_module, function class_visible, RequestID id, void|bool fast) { object conf = roxen.find_configuration( id->variables->config ); object ec = roxenloader.LowErrorContainer();
Roxen.git/server/config_interface/sites/add_module.pike:490:
qs += ({ ({ "deprecated", "1" }) }); } string qss = sprintf("%{%s=%s&%}", qs); qss += "&usr.set-wiz-id;#" + Roxen.http_encode_url(c); string content = sprintf("<a href='add_module.pike?%s'><dl><dt>%s</dt>", qss, c);
-
if (d && sizeof(String.trim_all_whites(d))) {
-
content
+
=
"<dd>" + d + "</dd>"
;
+
if (d &&
!
sizeof(String.trim_all_whites(d))) {
+
d
=
0
;
}
-
+
if (fast && (x || d)) {
+
content += "<dd>" + (d||" ") + "</dd>";
+
}
+
content += "</dl></a>"; if (x && fast) { content = "<div class='float-right select-multiple'>" "<submit-gbutton2 type='add'>Add modules</submit-gbutton2>" "</div>" + content; }
Roxen.git/server/config_interface/sites/add_module.pike:530:
string ret = "<div class='add-modules-wrapper'>"; if (fast) { ret = "<form method='post' action='add_module.pike'>" "<input type='hidden' name='config' value='&form.config;'>" "<roxen-wizard-id-variable/>" + ret; }
+
if (id->variables->mod_query && !sizeof(desc)) {
+
ret += sprintf(
+
"<div class='notify warn'>No modules matching \"%s\" were found</div>",
+
id->variables->mod_query);
+
}
+
return ret + desc + "</div>" + (fast ? "</form>" : "") + err; } string page_normal_search(RequestID id, void|bool fast) { return "<use file='/template-insert' />\n" "<tmpl>" + page_normal_low(id, fast) + "</tmpl>";