fixed bug #8903: redirect url is not passed with get/post method
authorSteffen Kamper <info@sk-typo3.de>
Wed, 12 Nov 2008 19:27:52 +0000 (19:27 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 12 Nov 2008 19:27:52 +0000 (19:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4461 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php

index 6cbe62c..1d5869e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-12  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #8903: redirect url is not passed with get/post method
+
 2008-11-12  Oliver Hader  <oliver@typo3.org>
 
        * Follow-up to feature #9654: Integrate return value depending on a found includeLibs configuration
index b0d38df..94db19f 100644 (file)
@@ -233,6 +233,8 @@ class tx_felogin_pi1 extends tslib_pibase {
                $subpart = $this->cObj->getSubpart($this->template, '###TEMPLATE_LOGIN###');
                $subpartArray = $linkpartArray = array();
 
+               $gpRedirectUrl = ''; 
+
                $markerArray['###LEGEND###'] = $this->pi_getLL('oLabel_header_welcome', '', 1);
 
                if($this->logintype === 'login') {
@@ -257,6 +259,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                                        // login error
                                $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('error_header',$this->conf['errorHeader_stdWrap.']);
                                $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('error_message',$this->conf['errorMessage_stdWrap.']);
+                               $gpRedirectUrl = t3lib_div::_GP('redirect_url');
                        }
                } else {
                        if($this->logintype === 'logout') {
@@ -300,7 +303,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                $markerArray['###PASSWORD_LABEL###'] = $this->pi_getLL('password', '', 1);
                $markerArray['###STORAGE_PID###'] = $this->spid;
                $markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
-               $markerArray['###REDIRECT_URL###'] = htmlspecialchars($this->redirectUrl);
+               $markerArray['###REDIRECT_URL###'] = $gpRedirectUrl ? htmlspecialchars($gpRedirectUrl) : htmlspecialchars($this->redirectUrl);
                $markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
 
                if ($this->flexFormValue('showForgotPassword','sDEF') || $this->conf['showForgotPasswordLink']) {
@@ -408,7 +411,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                                                        }
                                                break;
                                        }
-                               } elseif ($this->logintype === 'logout' || !$this->logintype) { // after logout
+                               } elseif ($this->logintype === 'logout') { // after logout
 
                                        // Hook for general actions after after logout has been confirmed
                                        if ($this->logintype === 'logout' && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed']) {
@@ -430,6 +433,10 @@ class tx_felogin_pi1 extends tslib_pibase {
                                } else { // not logged in
                                                // Placeholder for maybe future options
                                        switch ($redirMethod) {
+                                               case 'getpost':
+                                                       // preserve the get/post value
+                                                       $redirect_url = $this->redirectUrl;
+                                               break;
                                        }
                                }