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, $long) = @_;
11 $object = &html_escape($object);
12 if ($type eq 'shares') {
13 return &text("log_delete_${type}", $object);
15 elsif ($action eq 'save') {
16 if ($object eq 'global') {
17 return $text{"log_default_${type}"};
20 return &text("log_save_${type}", "<tt>$object</tt>");
23 elsif ($action eq 'create') {
24 return &text("log_create_${type}", "<tt>$object</tt>");
26 elsif ($action eq 'delete') {
27 return &text("log_delete_${type}", "<tt>$object</tt>");
29 elsif ($action eq 'manual') {
30 return &text("log_manual", "<tt>$object</tt>");
32 elsif ($action eq 'copy') {
33 return &text('log_copy', "<tt>$object</tt>",
34 "<tt>".&html_escape($p->{'copy'})."</tt>");
36 elsif ($action eq 'epass') {
37 return &text($long ? 'log_epass_l' : 'log_epass',
38 int($p->{'created'}), int($p->{'modified'}),
39 int($p->{'deleted'}));
41 elsif ($type eq 'euser') {
42 return &text("log_${action}_euser", "<tt>$object</tt>");
44 elsif ($type eq 'group') {
45 return &text("log_${action}_group", "<tt>$object</tt>");
47 elsif ($action eq 'kill') {
49 return &text('log_skill', "<tt>$object</tt>",
50 "<tt>".&html_escape($p->{'share'})."</tt>");
53 return &text('log_kill', "<tt>$object</tt>");
56 elsif ($action eq 'kills') {
58 return &text('log_skills', $object,
59 "<tt>".&html_escape($p->{'share'})."</tt>");
62 return &text('log_kills', $object);
65 elsif ($text{"log_${action}"}) {
66 return $text{"log_${action}"};