[TEP-COMMIT] CVS: catalog/catalog/includes/classes session_compatible.php,1.2,1.3

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

Modified Files:
	session_compatible.php 
Log Message:
fix the previous commit to use the $HTTP_*_VARS variables


Index: session_compatible.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/classes/session_compatible.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- session_compatible.php	17 Dec 2003 15:33:21 -0000	1.2
+++ session_compatible.php	17 Dec 2003 15:36:14 -0000	1.3
@@ -39,27 +39,25 @@
 
 // class methods
     function start() {
-      if (PHP_VERSION < 4.1) {
-        global $_GET, $_POST, $_COOKIE;
-      }
+      global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;
 
       $sane_session_id = true;
 
-      if (isset($_GET[$this->name])) {
-        if (preg_match('/^[a-zA-Z0-9]+$/', $_GET[$this->name]) == false) {
-          unset($_GET[$this->name]);
+      if (isset($HTTP_GET_VARS[$this->name])) {
+        if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_GET_VARS[$this->name]) == false) {
+          unset($HTTP_GET_VARS[$this->name]);
 
           $sane_session_id = false;
         }
-      } elseif (isset($_POST[$this->name])) {
-        if (preg_match('/^[a-zA-Z0-9]+$/', $_POST[$this->name]) == false) {
-          unset($_POST[$this->name]);
+      } elseif (isset($HTTP_POST_VARS[$this->name])) {
+        if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_POST_VARS[$this->name]) == false) {
+          unset($HTTP_POST_VARS[$this->name]);
 
           $sane_session_id = false;
         }
-      } elseif (isset($_COOKIE[$this->name])) {
-        if (preg_match('/^[a-zA-Z0-9]+$/', $_COOKIE[$this->name]) == false) {
-          unset($_COOKIE[$this->name]);
+      } elseif (isset($HTTP_COOKIE_VARS[$this->name])) {
+        if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_COOKIE_VARS[$this->name]) == false) {
+          unset($HTTP_COOKIE_VARS[$this->name]);
 
           $sane_session_id = false;
         }



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
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.