Follow-up to bugfix $altUrl parameter has no effect in t3lib_BEfunc::viewOnClick()
authorSteffen Kamper <info@sk-typo3.de>
Mon, 23 Nov 2009 09:25:46 +0000 (09:25 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 23 Nov 2009 09:25:46 +0000 (09:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6491 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index a71ca83..2e79084 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-23  Steffen Kamper  <info@sk-typo3.de>
+
+       * Follow-up to bugfix $altUrl parameter has no effect in t3lib_BEfunc::viewOnClick()
+
 2009-11-22  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #12666: Copying Record with TCEMain process cmdmap throws sql errors (Thanks to Tolleiv Nietsch)
index ef5825f..613e656 100644 (file)
@@ -2622,18 +2622,18 @@ final class t3lib_BEfunc {
 
                $viewScriptPreviewEnabled  = '/' . TYPO3_mainDir . 'mod/user/ws/wsol_preview.php?id=';
                $viewScriptPreviewDisabled = '/index.php?id=';
-
                if ($altUrl) {
                        $viewScriptPreviewEnabled = $viewScriptPreviewDisabled = $altUrl;
                }
+
                        // check alternate Domains
                if ($rootLine)  {
                        $parts = parse_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
-                       if (t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path']))    {
+                       if (t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path'])) {
                                $preUrl_temp = t3lib_BEfunc::firstDomainRecord($rootLine);
                        }
                }
-               $preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'..';
+               $preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://') . $preUrl_temp : $backPath . '..';
 
                        // Look if a fixed preview language should be added:
                $viewLanguageOrder = $GLOBALS['BE_USER']->getTSConfigVal('options.view.languageOrder');
@@ -2647,26 +2647,26 @@ final class t3lib_BEfunc {
                        }
 
                                // Traverse the view order, match first occurence:
-                       $lOrder = t3lib_div::intExplode(',',$viewLanguageOrder);
-                       foreach($lOrder as $langUid)    {
+                       $lOrder = t3lib_div::intExplode(',', $viewLanguageOrder);
+                       foreach($lOrder as $langUid) {
                                if (is_array($allowed_languages) && count($allowed_languages)) {
                                        if (isset($allowed_languages[$langUid])) {      // Choose if set.
-                                               $suffix = '&L='.$langUid;
+                                               $suffix = '&L=' . $langUid;
                                                break;
                                        }
                                } else {        // All allowed since no lang. are listed.
-                                       $suffix = '&L='.$langUid;
+                                       $suffix = '&L=' . $langUid;
                                        break;
                                }
                        }
 
                                // Add it:
-                       $addGetVars.= $suffix;
+                       $addGetVars .= $suffix;
+               }
 
+               $urlPreviewEnabled  = $preUrl . $viewScriptPreviewEnabled . $id . $addGetVars . $anchor;
+               $urlPreviewDisabled = $preUrl . $viewScriptPreviewDisabled . $id . $addGetVars . $anchor;
 
-                       $urlPreviewEnabled  = $preUrl . $viewScriptPreviewEnabled . $id . $addGetVars . $anchor;
-                       $urlPreviewDisabled = $preUrl . $viewScriptPreviewDisabled . $id . $addGetVars . $anchor;
-               }
 
                return "previewWin=window.open(top.WorkspaceFrontendPreviewEnabled?'" .
                        $urlPreviewDisabled . "':'" . $urlPreviewEnabled .