Fixed bug #12448: grid preview links are broken
authortolleiv <tolleiv@743128fe-103e-dd11-99c4-001b210b3e58>
Fri, 21 Jan 2011 19:25:42 +0000 (19:25 +0000)
committertolleiv <tolleiv@743128fe-103e-dd11-99c4-001b210b3e58>
Fri, 21 Jan 2011 19:25:42 +0000 (19:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/CoreProjects/workspaces/workspaces/trunk@3935 743128fe-103e-dd11-99c4-001b210b3e58

typo3/sysext/workspaces/ChangeLog
typo3/sysext/workspaces/Classes/Service/Workspaces.php
typo3/sysext/workspaces/Resources/Public/JavaScript/configuration.js

index 6158d31..6223b45 100644 (file)
@@ -1,5 +1,6 @@
 2011-01-21  Tolleiv Nietsch <typo3@tolleiv.de>
        
+       * Fixed bug #12448: grid preview links are broken
        * Raised version to 4.5.0rc1
        * Fixed bug #12415: Respect change #17167: Cache ExtDirect::getAPI calls
        * Fixed bug #12308: Workspace non-admin not workspace owner sees icon to swap updated version with Live site
index 37d843b..985e2ce 100644 (file)
@@ -490,9 +490,9 @@ class tx_Workspaces_Service_Workspaces {
        public static function viewSingleRecord($table, $uid, $record=null) {
                $viewUrl = '';
                if ($table == 'pages') {
-                       $viewUrl = t3lib_BEfunc::viewOnClick($uid);
+                       $viewUrl = t3lib_BEfunc::viewOnClick(t3lib_BEfunc::getLiveVersionIdOfRecord('pages', $uid));
                } elseif ($table == 'pages_language_oderlay' || $table == 'tt_content') {
-                       $elementRecord = is_array($record) ? $record : t3lib_BEfunc::getRecord($table, $uid);
+                       $elementRecord = is_array($record) ? $record : t3lib_BEfunc::getLiveVersionOfRecord($table, $uid);
                        $viewUrl = t3lib_BEfunc::viewOnClick($elementRecord['pid']);
                } else {
                        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['viewSingleRecord'])) {
index d9a1194..9ecd2c7 100644 (file)
@@ -260,7 +260,7 @@ TYPO3.Workspaces.Configuration.RowButtons = {
                        ,tooltip: TYPO3.lang["tooltip.viewElementAction"]
                        ,handler: function(grid, rowIndex, colIndex) {
                                var record = TYPO3.Workspaces.MainStore.getAt(rowIndex);
-                               TYPO3.Workspaces.Actions.viewSingleRecord(record.json.table, record.json.livepid);
+                               TYPO3.Workspaces.Actions.viewSingleRecord(record.json.table, record.json.uid);
                        },
                        getClass: function(v, meta, rec) {
                                if(!rec.json.allowedAction_view) {