Allow the server description to be set to explicitly nothing.
---- Changes since 1.500 ----
Show the real Samba version number on the main page.
+Fix list of users for a share to show open files correctly, and not show the same file multiple times on different shares.
{
local($l, $started, @rv);
local $out;
-&execute_command("$config{samba_status_program} -L", undef, \$out, undef);
+&execute_command("LANG=C $config{samba_status_program} -L", undef, \$out, undef);
foreach $l (split(/\n/, $out)) {
if ($l =~ /^----/) { $started = 1; }
- if ($started && $l =~ /^(\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)\s+(\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+)/) {
+ if ($started && $l =~ /^(\d+)\s+(\d+)\s+(\S+)\s+(0x\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S.*)\s\s((Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s.*)/i) {
+ # New-style line
+ push(@rv, [ $1, $3, $5, $6, $7.'/'.$8, $9 ]);
+ }
+ elsif ($started && $l =~ /^(\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)\s+(\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+)/) {
+ # Old-style line
push(@rv, [ $1, $2, $3, $4, $5, $6 ]);
}
}
if (!$in{'share'}) {
push(@cols, &html_escape($c->[0]));
}
+ $p = undef;
+ &get_share($c->[0]);
+ $p = &getval("path");
push(@cols, &html_escape($c->[1]));
push(@cols, &html_escape($c->[2]));
push(@cols, &html_escape($c->[4]));
push(@cols, &html_escape($c->[5]));
local $ulocks;
@ulocks = grep { $_->[0] == $c->[3] } @locks;
+ if ($p) {
+ # Limit to files under share
+ @ulocks = grep { $_->[4] =~ /^\Q$p\E\// } @ulocks;
+ }
foreach $l (@ulocks) {
$ulocks .= &html_escape($l->[4])." (".
&html_escape($l->[1]).")<br>\n";