Fixed bug #11138: preview links in page- and list-module point to mod.php instead...
authortolleiv <tolleiv@743128fe-103e-dd11-99c4-001b210b3e58>
Tue, 30 Nov 2010 14:02:10 +0000 (14:02 +0000)
committertolleiv <tolleiv@743128fe-103e-dd11-99c4-001b210b3e58>
Tue, 30 Nov 2010 14:02:10 +0000 (14:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/CoreProjects/workspaces/workspaces/trunk@3142 743128fe-103e-dd11-99c4-001b210b3e58

typo3/sysext/workspaces/ChangeLog
typo3/sysext/workspaces/Classes/Service/Befunc.php

index 83b3398..428e1bb 100644 (file)
@@ -1,3 +1,7 @@
+2010-11-30  Tolleiv Nietsch <typo3q@tolleiv.de>
+
+       * Fixed bug #11138: preview links in page- and list-module point to mod.php instead of typo3/mod.php
+
 2010-11-30  Oliver Hader  <oliver@tpyo3.org>
 
        * Fixed bug #11124: Stages should use suggest wizard for persons
index a8b8b1c..bbe1e79 100644 (file)
@@ -49,14 +49,15 @@ class tx_Workspaces_Service_Befunc {
                        $ctrl = t3lib_div::makeInstance('Tx_Workspaces_Controller_PreviewController', FALSE);
                        $uriBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
                        /**
-                        *  @todo BACK_PATH is not available be still needed when used during AJAX request
+                        *  This seems to be very harsh to set this directly to "/typo3 but the viewOnClick also
+                        *  has /index.php as fixed value here and dealing with the backPath is very error-prone
+                        *
                         *  @todo make sure this would work in local extension installation too
                         */
-                       $backPath = isset($GLOBALS['BACK_PATH']) ? $GLOBALS['BACK_PATH'] :  '../../../' . TYPO3_mainDir;
+                       $backPath = '/' . TYPO3_mainDir;
                                // @todo why do we need these additional params? the URIBuilder should add the controller, but he doesn't :(
                        $additionalParams = '&tx_workspaces_web_workspacesworkspaces%5Bcontroller%5D=Preview&M=web_WorkspacesWorkspaces&id=';
-
-                       $viewScript = '/' . $backPath . $uriBuilder->uriFor('index', array(), $ctrl, 'workspaces', 'web_workspacesworkspaces') . $additionalParams;
+                       $viewScript = $backPath . $uriBuilder->uriFor('index', array(), $ctrl, 'workspaces', 'web_workspacesworkspaces') . $additionalParams;
                }
        }