From: Frédéric Marchal Date: Tue, 9 Feb 2010 11:11:41 +0000 (+0000) Subject: Link to external css file instead of including it in each HTML file (thanks to Maxim... X-Git-Tag: v2.3-pre2~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33dc7dec6b16d2cff4be7f9dcf4cc95cc77d39e0;p=thirdparty%2Fsarg.git Link to external css file instead of including it in each HTML file (thanks to Maxim Britov) --- diff --git a/ChangeLog b/ChangeLog index 8753bbe..936f74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,13 @@ SARG ChangeLog -Feb-02-2009 Version 2.3 +Feb-09-2009 Version 2.3 - LDAP usertab added. Now you can have your users in a LDAP Server. Use these tags in sarg.conf: LDAPHost, LDAPPort, LDAPBindDN, LDAPBindPW, LDAPBaseSearch, LDAPFilterSearch - Parse the string flags from sarg.conf once during the reading of sarg.conf instead of manipulating and duplicating the tests of the strings where they are used. - Useragent report limited to requested date range. + - Link to external css file instead of including it verbatim in each HTML file (thanks to Maxim Britov). Feb-04-2010 Version 2.2.7 - Extra compile and run time protection (FORTIFY_SOURCE) fixed in configure. diff --git a/css.c b/css.c index de5c6fa..7417f27 100644 --- a/css.c +++ b/css.c @@ -29,20 +29,8 @@ void css(FILE *fp_css) { - FILE *fp_in; - char buf[MAXLEN]; - size_t nbytes; - if(ExternalCSSFile[0] != '\0') { - if((fp_in=fopen(ExternalCSSFile,"r"))==NULL) { - fprintf(stderr, "SARG: (css) %s: %s\n",text[45],ExternalCSSFile); - exit(1); - } - fputs("\n",fp_css); + fprintf(fp_css,"\n",ExternalCSSFile); return; } diff --git a/sarg.conf b/sarg.conf index ca20989..cd630b5 100644 --- a/sarg.conf +++ b/sarg.conf @@ -593,9 +593,17 @@ #block_it none # TAG: external_css_file path -# This tag allow internal sarg css override. +# This tag allow internal sarg css override by providing the name of +# the css file to link into each HTML page. +# +# In versions prior to 2.3, this used to be an absolute file name to +# a file to include verbatim in each HTML but as it takes a lot of +# spaces, version 2.3 switched to a link to an external css file. +# Therefore, it must be the HTTP server path on which a client browser +# may find the css file. +# # Sarg use theses style classes: -# .body body class +# .body body class # .info sarg information class, align=center # .title title class, align=center # .header header class, align:left