]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Don't create final files when index is set to only
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 27 Jan 2011 15:27:41 +0000 (15:27 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 27 Jan 2011 15:27:41 +0000 (15:27 +0000)
Some report files are unnecessary when indexonly is set. They are not
generated any more.

The temporary files that produces those files are still created.

report.c

index effb23ab8517cfc6a6904e934cf4ca67de196b65..a659890c869a2826721dcf317b3a20592cdef89f 100644 (file)
--- a/report.c
+++ b/report.c
@@ -352,30 +352,32 @@ void gerarel(void)
        if (!indexonly) tmpsort();
 
        if(email[0] == '\0') {
-               if((ReportType & REPORT_TYPE_DOWNLOADS) != 0) download_report();
+               topuser();
 
-               if(DansGuardianConf[0] != '\0') {
-                       dansguardian_log();
-               }
+               if (!indexonly) {
+                       if((ReportType & REPORT_TYPE_DOWNLOADS) != 0) download_report();
 
-               squidguard_log();
+                       if(DansGuardianConf[0] != '\0') {
+                               dansguardian_log();
+                       }
 
-               topuser();
+                       squidguard_log();
 
-               if((ReportType & REPORT_TYPE_TOPSITES) != 0) topsites();
+                       if((ReportType & REPORT_TYPE_TOPSITES) != 0) topsites();
 
-               if((ReportType & REPORT_TYPE_SITES_USERS) != 0) siteuser();
-               gen_denied_report();
+                       if((ReportType & REPORT_TYPE_SITES_USERS) != 0) siteuser();
+                       gen_denied_report();
 
-               authfail_report();
+                       authfail_report();
 
-               if(smartfilter) smartfilter_report();
+                       if(smartfilter) smartfilter_report();
 
-               if(DansGuardianConf[0] != '\0') dansguardian_report();
+                       if(DansGuardianConf[0] != '\0') dansguardian_report();
 
-               squidguard_report();
+                       squidguard_report();
 
-               if(!indexonly && (ReportType & REPORT_TYPE_USERS_SITES) != 0) htmlrel();
+                       if((ReportType & REPORT_TYPE_USERS_SITES) != 0) htmlrel();
+               }
 
                make_index();