Menu

#51 Webmin-sarg module - allow creation of report for today only

open
nobody
None
5
2005-10-15
2005-10-15
No

In the sarg module of webmin (running webmin v. 1.230),
it wasn't possible to generate the logs for today (this
patch, below, changes this with what I hope is no
impact otherwise).

I think it was a bit of a usability bug that if you have the
option Generate report by "All records in log file" and
the date range doing the same: that if you enter the
date range as 0 to 0 that the module would not pass a
date range at all to sarg and therefore sarg would
generate a report based on the whole access log.

This patch changes only the decision part in sarg-lib.pl
whether or not there was specified a start and end date
to recognize both dates being 0.

Patch is as follows:
$ diff sarg-lib.pl sarg-lib.pl.new
421c421
< if ( $from || $to ) {
---
> if ( ($from || $to) || ($from == 0 && $to == 0) ) {

ps: Thank you webmin developers for an excelent and
time-saving tool!!

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.