[BUGFIX] felogin: Fix explanation of absRefPrefix in error message 25/42325/3
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 6 Aug 2015 16:10:34 +0000 (18:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 6 Aug 2015 17:28:04 +0000 (19:28 +0200)
Wrong example given with absRelPrefix instead of absRefPrefix.

Resolves: #68796
Releases: master
Change-Id: I9796c1ec3f7150cb85852cd3c1a7355f91af0430
Reviewed-on: http://review.typo3.org/42325
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php
typo3/sysext/felogin/pi1/locallang.xlf

index 6de6c3e..563181a 100644 (file)
@@ -408,7 +408,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
                $res = $this->databaseConnection->exec_UPDATEquery('fe_users', 'uid=' . $user['uid'], array('felogin_forgotHash' => $randHashDB));
                // Send hashlink to user
                $this->conf['linkPrefix'] = -1;
-               $isAbsRelPrefix = !empty($this->frontendController->absRefPrefix);
+               $isAbsRefPrefix = !empty($this->frontendController->absRefPrefix);
                $isBaseURL = !empty($this->frontendController->baseUrl);
                $isFeloginBaseURL = !empty($this->conf['feloginBaseURL']);
                $link = $this->pi_getPageLink($this->frontendController->id, '', array(
@@ -419,11 +419,11 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
                if ($isFeloginBaseURL) {
                        // First priority, use specific base URL
                        // "absRefPrefix" must be removed first, otherwise URL will be prepended twice
-                       if (!empty($this->frontendController->absRefPrefix)) {
+                       if ($isAbsRefPrefix) {
                                $link = substr($link, strlen($this->frontendController->absRefPrefix));
                        }
                        $link = $this->conf['feloginBaseURL'] . $link;
-               } elseif ($isAbsRelPrefix) {
+               } elseif ($isAbsRefPrefix) {
                        // Second priority
                        // absRefPrefix must not necessarily contain a hostname and URL scheme, so add it if needed
                        $link = GeneralUtility::locationHeaderUrl($link);
index 733b596..f742b5a 100644 (file)
@@ -66,7 +66,7 @@ Another possibility is that cookies might be disabled in your web browser.</sour
                                <source>Please enter your new password twice. Password needs a minimum length of %s chars.</source>
                        </trans-unit>
                        <trans-unit id="ll_change_password_nolinkprefix_message">
-                               <source>Error: there is no prefix for the link. Please set one of the following in your typoscript template: plugin.tx_felogin_pi1.feloginBaseURL = http://yourdomain/, config.baseURL = http://yourdomain/, config.absRelPrefix = http://yourdomain/</source>
+                               <source>Error: there is no prefix for the link. Please set one of the following in your typoscript template: plugin.tx_felogin_pi1.feloginBaseURL = http://yourdomain/, config.baseURL = http://yourdomain/, config.absRefPrefix = /</source>
                        </trans-unit>
                        <trans-unit id="ll_change_password_notvalid_message">
                                <source>The link you clicked is not valid. Please repeat the forgot message procedure.</source>