Package: webalizer
Version: 2.01.10-27
Tags: patch
Followup-For: Bug #293794

Hi,

I have included a patch for this bug report.

Cheers,

tibob

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to 
en_US.iso88591)

Versions of packages webalizer depends on:
ii  debconf [debconf-2.0]         1.4.67     Debian configuration management sy
ii  libc6                         2.3.5-12   GNU C Library: Shared libraries an
ii  libdb4.2                      4.2.52-23  Berkeley v4.2 Database Libraries [
ii  libgd2-noxpm                  2.0.33-3   GD Graphics Library version 2 (wit
ii  libpng12-0                    1.2.8rel-5 PNG library - runtime
ii  zlib1g                        1:1.2.3-9  compression library - runtime

webalizer recommends no packages.

-- debconf information excluded
diff -ur webalizer-2.01.10/output.c webalizer-2.01.10-patch/output.c
--- webalizer-2.01.10/output.c  2006-01-20 15:40:12.000000000 +0100
+++ webalizer-2.01.10-patch/output.c    2006-01-20 15:13:26.000000000 +0100
@@ -1377,11 +1377,19 @@
          }
          else
          {
-            if (rptr->string[0] != '-')
-            fprintf(out_fp,"<A HREF=\"%s\">%s</A>",
-                rptr->string, rptr->string);
-            else
-            fprintf(out_fp,"%s", rptr->string);
+             if (rptr->string[0] != '-')
+             {
+                 if (nofollow == 0)
+                 {
+                     fprintf(out_fp,"<A HREF=\"%s\">%s</A>",
+                             rptr->string, rptr->string);
+                 } else {
+                     fprintf(out_fp,"<A HREF=\"%s\" rel=\"nofollow\">%s</A>",
+                             rptr->string, rptr->string);
+                 }
+             } else {
+                 fprintf(out_fp,"%s", rptr->string);
+             }
          }
          fprintf(out_fp,"</FONT></TD></TR>\n");
          tot_num--;
diff -ur webalizer-2.01.10/README webalizer-2.01.10-patch/README
--- webalizer-2.01.10/README    2001-10-24 06:05:07.000000000 +0200
+++ webalizer-2.01.10-patch/README      2006-01-20 15:39:32.000000000 +0100
@@ -870,6 +870,10 @@
               a value of zero ('0') to disable.  See the DNS.README
               file for additional information.
 
+NoFollow      Specifies if the attribute 'rel="nofollow"' should be added
+              to the links to the referrers. Use a value of zero ('0') to
+              disable. Default is enabled.
+
 
 Top Table Keywords
 ------------------
diff -ur webalizer-2.01.10/webalizer.c webalizer-2.01.10-patch/webalizer.c
--- webalizer-2.01.10/webalizer.c       2006-01-20 15:40:12.000000000 +0100
+++ webalizer-2.01.10-patch/webalizer.c 2006-01-20 15:01:45.000000000 +0100
@@ -139,6 +139,7 @@
 char    *blank_str   = "";                    /* blank string             */
 char    *dns_cache   = NULL;                  /* DNS cache file name      */
 int     dns_children = 0;                     /* DNS children (0=don't do)*/
+int     nofollow = 1;                         /* Referrer Following (0=no)*/
 
 int     ntop_sites   = 30;                    /* top n sites to display   */
 int     ntop_sitesK  = 10;                    /* top n sites (by kbytes)  */
@@ -1490,6 +1491,7 @@
                      "DNSChildren",       /* DNS Children (0=no DNS)    85  */
                      "DailyGraph",        /* Daily Graph (0=no)         86  */
                      "DailyStats"         /* Daily Stats (0=no)         87  */
+                     "NoFollow"           /* Referrer Following (0=no)  88  */
                    };
 
    FILE *fp;
@@ -1633,6 +1635,7 @@
 #endif  /* USE_DNS */
         case 86: daily_graph=(value[0]=='n')?0:1; break;  /* HourlyGraph    */
         case 87: daily_stats=(value[0]=='n')?0:1; break;  /* HourlyStats    */
+        case 88: nofollow== atoi(value);          break;  /* NoFollow       */
       }
    }
    fclose(fp);
diff -ur webalizer-2.01.10/webalizer.h webalizer-2.01.10-patch/webalizer.h
--- webalizer-2.01.10/webalizer.h       2006-01-20 15:40:12.000000000 +0100
+++ webalizer-2.01.10-patch/webalizer.h 2006-01-20 15:12:40.000000000 +0100
@@ -190,6 +190,7 @@
 extern char    *blank_str   ;                 /* blank string             */
 extern char    *dns_cache   ;                 /* DNS cache file name      */
 extern int     dns_children ;                 /* # of DNS children        */
+extern int     nofollow     ;                 /* Referrer Following (0=no)*/
 
 extern int     ntop_sites   ;                 /* top n sites to display   */
 extern int     ntop_sitesK  ;                 /* top n sites (by kbytes)  */

Reply via email to