From 2dd62844d17bbab0d21dcdd9081082205aaae538 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Tue, 30 Sep 2008 18:36:50 +1200 Subject: [PATCH] Revert active part of error page stylesheets. Strange Install blocker bug found. No solution yet. (19:04:54) rousskov: 2008/09/30 00:05:20| errorpage.cc(290) errorTryLoadText: '/usr/local/squid3-ecap/share/errors/templates//usr/local/squid3-ecap/etc/errorpage.css': (2) No such file or directory (19:07:52) rousskov: $ make install > /tmp/tm (19:07:52) rousskov: /bin/bash: -c: line 17: syntax error near unexpected token `then' (19:07:52) rousskov: /bin/bash: -c: line 17: `@if test -f /usr/local/squid3-ecap/etc/errorpage.css ; then \' --- errors/Makefile.am | 18 +++------------- errors/errorpage.css | 49 -------------------------------------------- src/Makefile.am | 2 -- src/cf.data.pre | 10 --------- src/errorpage.cc | 19 ----------------- src/errorpage.h | 1 - src/structs.h | 1 - 7 files changed, 3 insertions(+), 97 deletions(-) delete mode 100644 errors/errorpage.css diff --git a/errors/Makefile.am b/errors/Makefile.am index 79839d25aa..6c53194645 100644 --- a/errors/Makefile.am +++ b/errors/Makefile.am @@ -9,8 +9,6 @@ errordir = $(datadir)/errors ##dist-hook eveything DEFAULT_ERROR_DIR = $(errordir) -DEFAULT_STYLESHEET = $(sysconfdir)/errorpage.css - # List of automated translations possible: TRANSLATIONS = \ @@ -72,15 +70,7 @@ install-data-local: $(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \ done; \ fi \ - done; \ - $(INSTALL_DATA) $(srcdir)/errorpage.css $(DEFAULT_STYLESHEET).default; \ - @if test -f $(DEFAULT_STYLESHEET) ; then \ - echo "$@ will not overwrite existing $(DEFAULT_STYLESHEET)" ; \ - else \ - echo "$(INSTALL_DATA) $(srcdir)/errorpage.css $(DEFAULT_STYLESHEET)"; \ - $(INSTALL_DATA) $(srcdir)/errorpage.css $(DEFAULT_STYLESHEET); \ - fi - + done uninstall-local: @ for l in $(LANGUAGES); do \ @@ -94,8 +84,7 @@ uninstall-local: rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \ done; \ fi \ - done; \ - rm -f $(DEFAULT_STYLESHEET).default + done # undocumented hack. You can use this target to create multi-lingual # error pages. For example: @@ -141,8 +130,7 @@ dist-hook: cp -p $(srcdir)/$$lang/ERR_* $(distdir)/$$lang \ || exit 1; \ fi; \ - done; \ - cp $(srcdir)/errorpage.css $(distdir)/errorpage.css + done translate: @ if test "$(PO2HTML)" != "" ; then \ diff --git a/errors/errorpage.css b/errors/errorpage.css deleted file mode 100644 index 277411499f..0000000000 --- a/errors/errorpage.css +++ /dev/null @@ -1,49 +0,0 @@ - -// page basics -html body { - background-color:#ffffff; - font-family:verdana,sans-serif -} - -// initial title -h1 { -} - -// page sub-title -h2 { -} - -// general text -p { -} - -// error brief description -#error p { -} - -// some data which may have caused the prblem -#data { -} - -// the error message received from the system or other software -#sysmsg { -} - - -pre { - font-family:sans-serif -} - -// horizontal lines -hr { -} - -// page footer -#footer { -} - -// special event: FTP success page titles -ftpsuccess { - background-color:#00ff00; - width:100% -} diff --git a/src/Makefile.am b/src/Makefile.am index 23ac933c51..d16a8c4f37 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1043,7 +1043,6 @@ DEFAULT_HTTP_PORT = @CACHE_HTTP_PORT@ DEFAULT_ICP_PORT = @CACHE_ICP_PORT@ DEFAULT_PREFIX = $(prefix) DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf -DEFAULT_CONFIG_DIR = $(sysconfdir) DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'` DEFAULT_LOG_PREFIX = $(localstatedir)/logs @@ -1117,7 +1116,6 @@ cf.data: cf.data.pre Makefile s%@DEFAULT_ICON_DIR@%$(DEFAULT_ICON_DIR)%g;\ s%@DEFAULT_MIB_PATH@%$(DEFAULT_MIB_PATH)%g;\ s%@DEFAULT_ERROR_DIR@%$(DEFAULT_ERROR_DIR)%g;\ - s%@DEFAULT_CONFIG_DIR@%$(DEFAULT_CONFIG_DIR)%g;\ s%@DEFAULT_PREFIX@%$(DEFAULT_PREFIX)%g;\ s%@DEFAULT_HOSTS@%$(DEFAULT_HOSTS)%g;\ s%@[V]ERSION@%$(VERSION)%g;"\ diff --git a/src/cf.data.pre b/src/cf.data.pre index 35147c0100..36d9e97c75 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -4800,16 +4800,6 @@ DOC_START of is error page translations. DOC_END -NAME: err_page_stylesheet -TYPE: string -LOC: Config.errorStylesheet -DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css -DOC_START - CSS Stylesheet to pattern the display of Squid default error pages. - - For information on CSS see http://www.w3.org/Style/CSS/ -DOC_END - NAME: err_html_text TYPE: eol LOC: Config.errHtmlText diff --git a/src/errorpage.cc b/src/errorpage.cc index 29eedb4e02..21f2926a29 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -122,9 +122,6 @@ static char **error_text = NULL; /// \ingroup ErrorPageInternal static int error_page_count = 0; -/// \ingroup ErrorPageInternal -static MemBuf error_stylesheet; - static char *errorTryLoadText(const char *page_name, const char *dir, bool silent = false); static char *errorLoadText(const char *page_name); static const char *errorFindHardText(err_type type); @@ -185,17 +182,6 @@ errorInitialize(void) } } } - - error_stylesheet.reset(); - - // look for and load stylesheet into global MemBuf for it. - if(Config.errorStylesheet) { - char *temp = errorLoadText(Config.errorStylesheet); - if(temp) { - error_stylesheet.Printf("%s",temp); - safe_free(temp); - } - } } void @@ -688,11 +674,6 @@ ErrorState::Convert(char token) break; - case 'l': - mb.append(error_stylesheet.content(), error_stylesheet.contentSize()); - do_quote = 0; - break; - case 'L': if (Config.errHtmlText) { mb.Printf("%s", Config.errHtmlText); diff --git a/src/errorpage.h b/src/errorpage.h index 62399db040..243782ffd2 100644 --- a/src/errorpage.h +++ b/src/errorpage.h @@ -59,7 +59,6 @@ H - server host name x i - client IP address x I - server IP address x - l - HREF link for CSS stylesheet inclusion x L - HREF link for more info/contact x M - Request Method x m - Error message returned by auth helper x diff --git a/src/structs.h b/src/structs.h index 2d8621b35e..d47164f6d9 100644 --- a/src/structs.h +++ b/src/structs.h @@ -552,7 +552,6 @@ struct SquidConfig char *errorDefaultLanguage; int errorLogMissingLanguages; #endif - char *errorStylesheet; struct { -- 2.47.2