From: Frédéric Marchal Date: Tue, 7 Feb 2012 18:23:46 +0000 (+0100) Subject: No links in the denied page if the user is not on the topusers list X-Git-Tag: v2.3.3-pre1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbf8818d3be37dbb5ad1ea817ddc49225bbaa227;p=thirdparty%2Fsarg.git No links in the denied page if the user is not on the topusers list The report with the denied accesses contains links to the user report page but the user report page is not generated if the user is not on the topusers list. This patch hide the link if the user's page doesn't exists. --- diff --git a/denied.c b/denied.c index b92642d..2ca1627 100644 --- a/denied.c +++ b/denied.c @@ -148,9 +148,12 @@ void gen_denied_report(void) } 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) {