2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms)
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p) = @_;
11 $object = &html_escape($object);
13 return &text("log_acl_$action", "<tt>$object</tt>");
15 elsif ($type eq 'host') {
16 return &text("log_host_$action", "<tt>$object</tt>");
18 elsif ($type eq 'http' || $type eq 'icp' ||
19 $type eq 'always' || $type eq 'never' ||
20 $type eq 'pool' || $type eq 'delay' ||
21 $type eq 'headeracc' || $type eq 'refresh') {
22 return &text("log_${type}_${action}",
23 "<tt>".&html_escape($object)."</tt>");
25 elsif ($type eq 'pools' || $type eq 'refreshes' || $type eq 'hosts') {
26 return &text("log_${type}_${action}", $object);
28 elsif ($type eq 'user') {
29 return &text("log_user_$action", "<tt>$object</tt>");
31 elsif ($action eq 'purge') {
32 return &text('log_purge', "<tt>".&html_escape($object)."</tt>");
34 elsif ($text{"log_$action"}) {
35 return $text{"log_$action"};