Revision: 7380
          http://sourceforge.net/p/ipcop/svn/7380
Author:   owes
Date:     2014-03-27 07:40:58 +0000 (Thu, 27 Mar 2014)
Log Message:
-----------
Fix IPCop error pages after changes in squid-langpack.

Modified Paths:
--------------
    ipcop/trunk/lfs/squid-langpack

Modified: ipcop/trunk/lfs/squid-langpack
===================================================================
--- ipcop/trunk/lfs/squid-langpack      2014-03-26 20:47:27 UTC (rev 7379)
+++ ipcop/trunk/lfs/squid-langpack      2014-03-27 07:40:58 UTC (rev 7380)
@@ -85,9 +85,9 @@
 
 IPCOP_ERR_STYLE_CODE = <style 
type="text/css"><!--body{background-color:\#e0e0e0;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;margin-width:0px;margin-height:0px;font-family:verdana,sans-serif}pre{font-family:sans-serif}--></style>
 
-IPCOP_ERR_BODY_CODE  = <table width="100%" border="0" cellspacing="0" 
cellpadding="0" style="background-color:\#000000"> <tr><td><img 
src="http://%h:81/images/blacklogo.png"; width="480" height="72" alt="IPCop 
Firewall" /></td></tr> </table> <blockquote>
+IPCOP_ERR_BODY_CODE  = <table width="100%" border="0" cellspacing="0" 
cellpadding="0" style="background-color:\#000000"> <tr><td><img 
src="http://%h:81/images/blacklogo.png"; width="480" height="72" alt="IPCop 
Firewall" /></td></tr> </table>
 
-IPCOP_ERR_POST_CODE  = <div id="footer"> <p></p> <small><address>Generated %T 
by %h (%s)</address></small> </blockquote> <p></p> </div> </body> </html>
+IPCOP_ERR_POST_CODE  = <div id="footer"><address><small>Generated %T by %h 
(%s)</small></address></div> </body></html>
 
 $(TARGET) : $(firstword $(MAKEFILE_LIST))
        # Build every time the exact list, not only on first build.
@@ -111,9 +111,9 @@
        # Adding IPCop design to the built-in error files
        cp -rp $(ERRMSG_DIR)/* $(ERRMSG_DIR).ipcop
 
-       # 1 - replace space at end of each html tag with line feed, so sed 
could work on tag as line
-       # 2 - remove all empty lines and the H1 header tag (if any)
-       # 3 - replace the entire STYLE tag
+       # 1 - remove all empty lines and the H1 header tag (if any)
+       # 2 - remove the entire STYLE tag
+       # 3 - insert our stype after the TITLE tag
        # 4 - insert a table with IPCop graphics after the BODY tag
        # 5 - disable built-in footer
        # 6 - add a new footer and close the BODY and HTML tags
@@ -122,10 +122,10 @@
        # If not, we should fix our cleaning
        for LANGUAGE in $(ERRMSG_DIR).ipcop/* ; do \
                for ERRMSG_FILE in $${LANGUAGE}/* ; do \
-                       sed -i -e 's/> />\n/g' $${ERRMSG_FILE} ; \
                        sed -i -e 's/^ *//' -e '/^$$/d' -e '/^<h1>.*<\/h1>/d' 
$${ERRMSG_FILE} ; \
-                       sed -i -e '/<style/ c\$(IPCOP_ERR_STYLE_CODE)' 
$${ERRMSG_FILE} ; \
-                       sed -i -e '/<body>/ a\$(IPCOP_ERR_BODY_CODE)' 
$${ERRMSG_FILE} ; \
+                       sed -i -e '/<style/,/<\/style/'d $${ERRMSG_FILE} ; \
+                       sed -i -e '/<title/ a\$(IPCOP_ERR_STYLE_CODE)' 
$${ERRMSG_FILE} ; \
+                       sed -i -e '/<body/ a\$(IPCOP_ERR_BODY_CODE)' 
$${ERRMSG_FILE} ; \
                        sed -i -e '/<div id="footer">/,$$d' $${ERRMSG_FILE} ; \
                        sed -i -e '$$a\$(IPCOP_ERR_POST_CODE)' $${ERRMSG_FILE} 
; \
                done ; \

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to