Added SYS[requestURIvar] to get original value of REQUEST_URI (needed by some URL...
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Tue, 30 Jan 2007 20:57:29 +0000 (20:57 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Tue, 30 Jan 2007 20:57:29 +0000 (20:57 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1964 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 29c59af..66464d8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * Fixing oddities in recursive stdWraps (bugs #4312 and #4871)
        * Fix bug #4678: t3lib_div::array2xml() may crash with PHP 5.2.0
        * Fix bug #3648: ease use of tslib_cObj::getTreeList()
+       * Added SYS[requestURIvar] to get original value of REQUEST_URI (needed by some URL writers for IIS)
 
 2007-01-30  Dmitry Dulepov  <dmitry@typo3.org>
 
index 874929d..3346d1f 100755 (executable)
@@ -3068,7 +3068,10 @@ class t3lib_div {
                        break;
                        case 'REQUEST_URI':
                                        // Typical application of REQUEST_URI is return urls, forms submitting to itself etc. Example: returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))
-                               if (!$_SERVER['REQUEST_URI'])   {       // This is for ISS/CGI which does not have the REQUEST_URI available.
+                               if ($GLOBALS['TYPO3_CONF_VAR']['SYS']['requestURIvar']) {       // This is for URL rewriters that store the original URI in a server variable (eg ISAPI_Rewriter for IIS: HTTP_X_REWRITE_URL)
+                                       list($v,$n) = explode('|',$GLOBALS['TYPO3_CONF_VAR']['SYS']['requestURIvar']);
+                                       $retVal = $GLOBALS[$v][$n];
+                               } elseif (!$_SERVER['REQUEST_URI'])     {       // This is for ISS/CGI which does not have the REQUEST_URI available.
                                        $retVal = '/'.ereg_replace('^/','',t3lib_div::getIndpEnv('SCRIPT_NAME')).
                                                ($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'');
                                } else $retVal = $_SERVER['REQUEST_URI'];
@@ -4585,7 +4588,7 @@ class t3lib_div {
 
 
        /**
-        * Quotes a string for usage as JS parameter. Depends wheter the value is used in script tags (it doesn't need/must not get htmlspecialchared in this case)
+        * Quotes a string for usage as JS parameter. Depends wheter the value is used in script tags (it doesn't need/must not get htmlspecialchar'ed in this case)
         *
         * @param       string          The string to encode.
         * @param       boolean         If the values get's used in <script> tags.