SOURCES: gubed-quanta-basename.patch (NEW) - fix getting basedir

glen glen at pld-linux.org
Thu Aug 18 13:30:45 CEST 2005


Author: glen                         Date: Thu Aug 18 11:30:42 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix getting basedir

---- Files affected:
SOURCES:
   gubed-quanta-basename.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gubed-quanta-basename.patch
diff -u /dev/null SOURCES/gubed-quanta-basename.patch:1.1
--- /dev/null	Thu Aug 18 13:30:42 2005
+++ SOURCES/gubed-quanta-basename.patch	Thu Aug 18 13:30:34 2005
@@ -0,0 +1,12 @@
+--- ./Gubed/StartSession.php~	2005-03-09 22:33:31.000000000 +0200
++++ ./Gubed/StartSession.php	2005-08-18 14:27:21.000000000 +0300
+@@ -32,7 +32,8 @@
+          if(strtolower(substr($GLOBALS['gbd']['Script'], 7, strlen($_SERVER['SERVER_NAME']))) == strtolower($_SERVER['SERVER_NAME']))
+             $GLOBALS['gbd']['Script'] = substr($GLOBALS['gbd']['Script'], strlen($_SERVER['SERVER_NAME']) + 7);
+ 
+-         $gbdBase = substr($_SERVER['SCRIPT_FILENAME'], 0, -strlen($_SERVER['SCRIPT_NAME']));
++		 // SCRIPT_NAME here with apache-1.3.33/php-4.4.0 is with path component, use basename() to get rid of it
++         $gbdBase = substr($_SERVER['SCRIPT_FILENAME'], 0, -strlen(basename($_SERVER['SCRIPT_NAME'])));
+       
+          $GLOBALS['gbd']['SessionFile'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];//$_SERVER['REQUEST_URI'];
+          $GLOBALS['gbd']['SessionFile'] = substr($GLOBALS['gbd']['SessionFile'], 0,  strpos($GLOBALS['gbd']['SessionFile'], '?'));
================================================================



More information about the pld-cvs-commit mailing list