]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Don't link the download report to users not in the topusers list
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 1 Nov 2011 07:30:48 +0000 (07:30 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 1 Nov 2011 07:30:48 +0000 (07:30 +0000)
If the topusers list is truncated, don't link the download page to the
missing users.

CMakeLists.txt
ChangeLog
download.c
include/info.h
report.c

index 24a870d28f0e273a3d362af76752e4d028723c4e..28a13a6dc2c7ab9dc6f2802c939c8e40b2447760 100755 (executable)
@@ -3,7 +3,7 @@ PROJECT(sarg C)
 SET(sarg_VERSION 2)
 SET(sarg_REVISION "3.2-pre2")
 SET(sarg_BUILD "")
-SET(sarg_BUILDDATE "Oct-30-2011")
+SET(sarg_BUILDDATE "Nov-01-2011")
 
 INCLUDE(AddFileDependencies)
 INCLUDE(CheckIncludeFile)
index d621462a9baabafc22fe7a816bcecd041a75e6bf..e44f814d10ba4b590a82e978886bb7c8eb705a0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 SARG ChangeLog
 
-Oct-30-2011 Version 2.3.2-pre2
+Nov-01-2011 Version 2.3.2-pre2
                - Add support for sorttable.js (http://www.kryogenix.org/code/browser/sorttable/) to dynamically sort some tables (thanks to Éric).
                - Add the two command line options --lastlog and --keeplogs to set the number of reports to keep or to keep all the reports respectively (thanks to Emmanuel Lacour for the suggestion).
                - Report the user ID in the e-mail report.
index b424a0a67e73ceb8179cf6269687d5e5c8f83ee4..75421a6d20529278bef6df5564b5eac77b88a576 100644 (file)
@@ -143,9 +143,12 @@ void download_report(void)
                for (i=strlen(url)-1 ; i>=0 && (unsigned char)url[i]<' ' ; i--) url[i]=0;
 
                fputs("<tr>",fp_ou);
-               if (new_user)
-                       fprintf(fp_ou,"<td class=\"data\"><a href=\"%s/%s.html\">%s</a></td><td class=\"data\">%s</td>",uinfo->filename,uinfo->filename,uinfo->label,ip);
-               else
+               if (new_user) {
+                       if (uinfo->topuser)
+                               fprintf(fp_ou,"<td class=\"data\"><a href=\"%s/%s.html\">%s</a></td><td class=\"data\">%s</td>",uinfo->filename,uinfo->filename,uinfo->label,ip);
+                       else
+                               fprintf(fp_ou,"<td class=\"data\">%s</td><td class=\"data\">%s</td>",uinfo->label,ip);
+               } else
                        fputs("<td class=\"data\"></td><td class=\"data\"></td>",fp_ou);
                fprintf(fp_ou,"<td class=\"data\">%s-%s</td><td class=\"data2\">",data,hora);
                if(BlockIt[0]!='\0' && url[0]!=ALIAS_PREFIX) {
index c4acc1abfcc8131fa54769e5123337886c953884..045e3001abf51c7dcc0ea59720e1db9a5a643a2b 100755 (executable)
@@ -1,3 +1,3 @@
-#define VERSION PACKAGE_VERSION" Oct-30-2011"
+#define VERSION PACKAGE_VERSION" Nov-01-2011"
 #define PGM PACKAGE_NAME
 #define URL "http://sarg.sourceforge.net"
index 69dc8c29d2077ce3ce8382fe1fc2162a72a8cfd7..625c528254aeb50f8e3ab17c78205d44c7d16e85 100644 (file)
--- a/report.c
+++ b/report.c
@@ -348,11 +348,6 @@ void gerarel(void)
 
        if(email[0] == '\0') {
                if (!indexonly) {
-                       if((ReportType & REPORT_TYPE_DOWNLOADS) != 0)
-                               download_report();
-                       else if (debugz)
-                               debugaz(_("Downloaded files report not requested in report_type\n"));
-
                        if(DansGuardianConf[0] != '\0')
                                dansguardian_log();
                        else if (debugz)
@@ -364,6 +359,11 @@ void gerarel(void)
                topuser();
 
                if (!indexonly) {
+                       if((ReportType & REPORT_TYPE_DOWNLOADS) != 0)
+                               download_report();
+                       else if (debugz)
+                               debugaz(_("Downloaded files report not requested in report_type\n"));
+
                        if((ReportType & REPORT_TYPE_TOPSITES) != 0)
                                topsites();
                        else if (debugz)