diff options
author | garga <garga@FreeBSD.org> | 2012-01-12 21:13:50 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2012-01-12 21:13:50 +0800 |
commit | 9d23f057a7d45146184ee0e573901493acf148a7 (patch) | |
tree | e17eda4d48b662348bd1c8df7104675f9a4f7a84 /www/sarg | |
parent | 97621863b2dc9a65b94fe826fc49f7694c0f7f28 (diff) | |
download | freebsd-ports-gnome-9d23f057a7d45146184ee0e573901493acf148a7.tar.gz freebsd-ports-gnome-9d23f057a7d45146184ee0e573901493acf148a7.tar.zst freebsd-ports-gnome-9d23f057a7d45146184ee0e573901493acf148a7.zip |
- Fix the link to the URL in some reports
- Bump PORTREVISION
Reported by: budsz <budsz@willsz.net>
Obtained from: http://sarg.svn.sourceforge.net/viewvc/sarg?view=revision&revision=595
Diffstat (limited to 'www/sarg')
-rw-r--r-- | www/sarg/Makefile | 2 | ||||
-rw-r--r-- | www/sarg/files/patch-fix_missing_href | 142 |
2 files changed, 143 insertions, 1 deletions
diff --git a/www/sarg/Makefile b/www/sarg/Makefile index dcba15b547be..9d632427839d 100644 --- a/www/sarg/Makefile +++ b/www/sarg/Makefile @@ -7,7 +7,7 @@ PORTNAME= sarg PORTVERSION= 2.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} diff --git a/www/sarg/files/patch-fix_missing_href b/www/sarg/files/patch-fix_missing_href new file mode 100644 index 000000000000..d7a5d3771588 --- /dev/null +++ b/www/sarg/files/patch-fix_missing_href @@ -0,0 +1,142 @@ +Index: redirector.c +=================================================================== +--- redirector.c (revision 594) ++++ redirector.c (revision 595) +@@ -552,7 +552,7 @@ + else + fputs("<tr><td class=\"data2\"></td><td class=\"data2\"></td>",fp_ou); + fprintf(fp_ou,"<td class=\"data2\">%s-%s</td><td class=\"data2\">",data,hora); +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,NULL,url,100); + fprintf(fp_ou,"</td><td class=\"data2\">%s</td></tr>\n",rule); + } + fclose(fp_in); +Index: util.c +=================================================================== +--- util.c (revision 594) ++++ util.c (revision 595) +@@ -1724,16 +1724,18 @@ + so the A tag is not written around the host name. + + \param fp_ou The handle of the HTML file. ++ \param scheme The scheme to print in the link (http:// if the pointer is null). + \param url The host to display in the HTML file. + \param maxlen The maximum number of characters to print into the host name. + */ +-void output_html_link(FILE *fp_ou,const char *url,int maxlen) ++void output_html_link(FILE *fp_ou,const char *scheme,const char *url,int maxlen) + { + if (url[0]==ALIAS_PREFIX) { + // this is an alias, no need for a A tag + output_html_string(fp_ou,url+1,100); + } else { +- fputs("<a href=\"http://",fp_ou); ++ if (scheme==NULL) scheme="http://"; ++ fprintf(fp_ou,"<a href=\"%s",scheme); + output_html_url(fp_ou,url); + fputs("\">",fp_ou); + output_html_string(fp_ou,url,100); +Index: denied.c +=================================================================== +--- denied.c (revision 594) ++++ denied.c (revision 595) +@@ -158,7 +158,7 @@ + output_html_url(fp_ou,url); + fprintf(fp_ou,"\"><img src=\"%s/sarg-squidguard-block.png\"></a> ",ImageFile); + } +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,"",url,100); //the URL contains the scheme + fputs("</td></tr>\n",fp_ou); + } + fclose(fp_in); +Index: include/defs.h +=================================================================== +--- include/defs.h (revision 594) ++++ include/defs.h (revision 595) +@@ -253,7 +253,7 @@ + __attribute__((warn_unused_result)) int write_html_trailer(FILE *fp_ou); + void output_html_string(FILE *fp_ou,const char *str,int maxlen); + void output_html_url(FILE *fp_ou,const char *url); +-void output_html_link(FILE *fp_ou,const char *url,int maxlen); ++void output_html_link(FILE *fp_ou,const char *scheme,const char *url,int maxlen); + void debuga(const char *msg,...) __attribute__((format(printf,1,2))); + void debugaz(const char *msg,...) __attribute__((format(printf,1,2))); + void my_lltoa(unsigned long long int n, char *s, int ssize, int len); +Index: download.c +=================================================================== +--- download.c (revision 594) ++++ download.c (revision 595) +@@ -156,7 +156,7 @@ + output_html_url(fp_ou,url); + fprintf(fp_ou,"\"><img src=\"%s/sarg-squidguard-block.png\"></a> ",ImageFile); + } +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,"",url,100);//scheme is kept from the log file + fputs("</td></tr>\n",fp_ou); + } + fclose(fp_in); +Index: topsites.c +=================================================================== +--- topsites.c (revision 594) ++++ topsites.c (revision 595) +@@ -275,7 +275,7 @@ + fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a> ",fp_ou); + } + +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,NULL,url,100); + fputs("</td><td class=\"data\"",fp_ou); + if (SortTableJs[0]) fprintf(fp_ou," sorttable_customkey=\"%"PRId64"\"",(uint64_t)twork1); + fprintf(fp_ou,">%s</td>",fixnum(twork1,1)); +Index: authfail.c +=================================================================== +--- authfail.c (revision 594) ++++ authfail.c (revision 595) +@@ -189,7 +189,7 @@ + output_html_url(fp_ou,url); + fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a> ",fp_ou); + } +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,"",url,100); //the original scheme is left in the URL + fputs("</td></th>\n",fp_ou); + } + fclose(fp_in); +Index: siteuser.c +=================================================================== +--- siteuser.c (revision 594) ++++ siteuser.c (revision 595) +@@ -146,7 +146,7 @@ + output_html_url(fp_ou,ourl); + fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a> ",fp_ou); + } +- output_html_link(fp_ou,ourl,100); ++ output_html_link(fp_ou,NULL,ourl,100); + fputs("</td>",fp_ou); + + if (BytesInSitesUsersReport) { +Index: html.c +=================================================================== +--- html.c (revision 594) ++++ html.c (revision 595) +@@ -285,7 +285,7 @@ + output_html_url(fp_ou,url); + fprintf(fp_ou,"\"><img src=\"%s/sarg-squidguard-block.png\"></a> ",tmp6); + } +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,NULL,url,100); + fputs("</td>",fp_ou); + } + +Index: dansguardian_report.c +=================================================================== +--- dansguardian_report.c (revision 594) ++++ dansguardian_report.c (revision 595) +@@ -155,7 +155,7 @@ + } + + fprintf(fp_ou,"<tr><td class=\"data2\">%s</td><td class=\"data2\">%s</td><td class=\"data2\">%s-%s</td><td class=\"data2\">",name,ip,date,hour); +- output_html_link(fp_ou,url,100); ++ output_html_link(fp_ou,NULL,url,100); + fprintf(fp_ou,"</td><td class=\"data2\">%s</td></tr>\n",rule); + } + fclose(fp_in); |