Show job submission time on CUPS

This commit is contained in:
Jamie Cameron
2008-11-17 19:14:00 +00:00
parent 1a6a864830
commit cb76fc4825
2 changed files with 9 additions and 0 deletions

View File

@@ -13,3 +13,5 @@ Added checkboxes and a button for deleting multiple printers at once.
Fixed a bug that stopped SMB printer usernames and passwords from being displayed when editing a printer under CUPS.
---- Changes since 1.380 ----
Re-designed the print jobs page to allow several to be cancelled at once, using the standard Webmin table with checkboxes.
---- Changes since 1.440 ----
Show the date and time a job was submitted on systems using CUPS.

View File

@@ -138,10 +138,17 @@ while(<LPQ>) {
while($f = readdir(DIR)) {
if ($f =~ /^d(\d+)\-(\d+)$/ && $1 == $job{'id'}) {
push(@pq, "$d/$f");
local @st = stat("$d/$f");
if (@st) {
$job{'time'} ||= $st[9];
}
}
}
closedir(DIR);
$job{'printfile'} = @pq ? \@pq : undef;
if ($job{'time'}) {
$job{'when'} = &make_date($job{'time'});
}
push(@jobs, \%job);
}
}