From: Frédéric Marchal Date: Tue, 1 Nov 2011 07:30:48 +0000 (+0000) Subject: Don't link the download report to users not in the topusers list X-Git-Tag: v2.3.2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5138c1b945ccda32b924a80d16b391169a8a023f;p=thirdparty%2Fsarg.git Don't link the download report to users not in the topusers list If the topusers list is truncated, don't link the download page to the missing users. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 24a870d..28a13a6 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/ChangeLog b/ChangeLog index d621462..e44f814 100644 --- 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. diff --git a/download.c b/download.c index b424a0a..75421a6 100644 --- a/download.c +++ b/download.c @@ -143,9 +143,12 @@ void download_report(void) for (i=strlen(url)-1 ; i>=0 && (unsigned char)url[i]<' ' ; i--) url[i]=0; fputs("",fp_ou); - if (new_user) - fprintf(fp_ou,"%s%s",uinfo->filename,uinfo->filename,uinfo->label,ip); - else + if (new_user) { + if (uinfo->topuser) + fprintf(fp_ou,"%s%s",uinfo->filename,uinfo->filename,uinfo->label,ip); + else + fprintf(fp_ou,"%s%s",uinfo->label,ip); + } else fputs("",fp_ou); fprintf(fp_ou,"%s-%s",data,hora); if(BlockIt[0]!='\0' && url[0]!=ALIAS_PREFIX) { diff --git a/include/info.h b/include/info.h index c4acc1a..045e300 100755 --- a/include/info.h +++ b/include/info.h @@ -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" diff --git a/report.c b/report.c index 69dc8c2..625c528 100644 --- 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)