[TEP-COMMIT] CVS: catalog/catalog/includes/functions gzip_compression.php,1.3,1.4

Harald Ponce de Leon <[email protected]>
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /cvsroot/tep/catalog/catalog/includes/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv3036/functions

Modified Files:
	gzip_compression.php 
Log Message:
use the super global variables


Index: gzip_compression.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/functions/gzip_compression.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- gzip_compression.php	11 Feb 2003 01:31:02 -0000	1.3
+++ gzip_compression.php	17 Nov 2003 18:38:17 -0000	1.4
@@ -11,15 +11,17 @@
 */
 
   function tep_check_gzip() {
-    global $HTTP_ACCEPT_ENCODING;
+    if (PHP_VERSION < 4.1) {
+      global $_SERVER;
+    }
 
     if (headers_sent() || connection_aborted()) {
       return false;
     }
 
-    if (strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false) return 'x-gzip';
+    if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false) return 'x-gzip';
 
-    if (strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false) return 'gzip';
+    if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) return 'gzip';
 
     return false;
   }



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.