LP1171875 Support locale CGI param for fm_IDL.xml
authorBill Erickson <berick@esilibrary.com>
Mon, 6 May 2013 13:59:22 +0000 (09:59 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 2 Aug 2013 20:05:54 +0000 (16:05 -0400)
Adds support for passing the locale string directly to
/reports/fm_IDL.xml via locale= CGI parameter.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/examples/apache/eg_vhost.conf.in
Open-ILS/examples/apache_24/eg_vhost.conf.in

index 60605b3..bf58315 100644 (file)
@@ -527,6 +527,11 @@ RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
     AddOutputFilter INCLUDES;XMLENT .xhtml
 </LocationMatch>
 
+# capture locale CGI param for /reports/fm_IDL.xml
+RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
+RewriteCond %{QUERY_STRING} locale=([^&;]*)
+RewriteRule . - [E=locale:%1]
+
 <LocationMatch /reports/fm_IDL.xml>
     IDLChunkStripPI "yes"
     IDLChunkEscapeScript "no"
index b606c02..f8537d4 100644 (file)
@@ -532,6 +532,11 @@ RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
     AddOutputFilter INCLUDES;XMLENT .xhtml
 </LocationMatch>
 
+# capture locale CGI param for /reports/fm_IDL.xml
+RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
+RewriteCond %{QUERY_STRING} locale=([^&;]*)
+RewriteRule . - [E=locale:%1]
+
 <LocationMatch /reports/fm_IDL.xml>
     IDLChunkStripPI "yes"
     IDLChunkEscapeScript "no"