]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Don't try to produce the users's report if indexonly is set
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 27 Jan 2011 15:27:01 +0000 (15:27 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 27 Jan 2011 15:27:01 +0000 (15:27 +0000)
The creation of the users's report was failing when indexonly was set
because the list of the users to process is taken from memory instead
of collecting it from the files in the output directory.

As no temporary file is created when indexonly is set, the output
directory is empty but as the users's name are still stored in memory,
sarg tried to read the non existant file and aborted.

report.c

index 2f86740be59f476702a3fec323842eeca8c11357..1f8543f64254652121b1099ff205956d6d749b3a 100644 (file)
--- a/report.c
+++ b/report.c
@@ -375,7 +375,7 @@ void gerarel(void)
 
                squidguard_report();
 
-               if((ReportType & REPORT_TYPE_USERS_SITES) != 0) htmlrel();
+               if(!indexonly && (ReportType & REPORT_TYPE_USERS_SITES) != 0) htmlrel();
 
                make_index();