From dbf8818d3be37dbb5ad1ea817ddc49225bbaa227 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Tue, 7 Feb 2012 19:23:46 +0100 Subject: [PATCH] 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. --- denied.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) { -- 2.47.2