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 if ($action eq "upload") {
12 local @uploads = split(/\0/, $p->{'uploads'});
14 return &text('log_upload_l',
15 join(" ", map { "<tt>".&html_escape($_)."</tt>" } @uploads));
18 return &text('log_upload', scalar(@uploads));
21 elsif ($action eq "download") {
22 local $pfx = $p->{'time'} ? "log_sdownload" : "log_download";
23 local @downloads = split(/\0/, $p->{'urls'});
25 return &text($pfx.'_l',
26 join(" ", map { "<tt>".&html_escape($_)."</tt>" } @downloads));
29 return &text($pfx, scalar(@downloads));
32 elsif ($action eq "cancel") {
33 local @ids = split(/\0/, $p->{'ids'});
34 return &text('log_cancel', scalar(@ids));