[BUGFIX] History service does not show details anymore
authorOliver Hader <oliver@typo3.org>
Wed, 26 Dec 2012 16:40:31 +0000 (17:40 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 4 Jan 2013 08:22:20 +0000 (09:22 +0100)
The history service in the workspace module does not contain
any details for modified records.

There are two things that result in this behaviour:
* the history service works on the live record and automatically
  resolves the workspace version
* the security fix in #42696 introduces a permission check for
  pages (which is -1 if using the workspace version directly)

Thus, the reference to the live record needs to be used instead.

Change-Id: Idd46531d2f54ef56691f1464f6dfb892549fbf8a
Fixes: #44225
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/17275
Reviewed-by: Mattias Nilsson
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/workspaces/Classes/ExtDirect/ExtDirectServer.php
typo3/sysext/workspaces/Resources/Public/JavaScript/configuration.js
typo3/sysext/workspaces/Resources/Public/JavaScript/helpers.js

index b1847f0..aa6c89e 100644 (file)
@@ -84,7 +84,7 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
        public function getHistory($parameters) {
                /** @var $historyService \TYPO3\CMS\Workspaces\Service\HistoryService */
                $historyService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\HistoryService');
-               $history = $historyService->getHistory($parameters->table, $parameters->versionId);
+               $history = $historyService->getHistory($parameters->table, $parameters->liveId);
                return array(
                        'data' => $history,
                        'total' => count($history)
index b036ade..a541779 100644 (file)
@@ -338,6 +338,7 @@ TYPO3.Workspaces.Configuration.RowButtons = {
                                var record = TYPO3.Workspaces.MainStore.getAt(rowIndex);
                                TYPO3.Workspaces.Helpers.getHistoryWindow({
                                        table: record.json.table,
+                                       liveId: record.json.t3ver_oid,
                                        versionId: record.json.uid
                                });
                        }
index 8673a28..4c0b6a3 100644 (file)
@@ -162,6 +162,7 @@ TYPO3.Workspaces.Helpers = {
                                                listeners: {
                                                        beforeload: function(store, options) {
                                                                store.setBaseParam('table', configuration.table);
+                                                               store.setBaseParam('liveId', configuration.liveId);
                                                                store.setBaseParam('versionId', configuration.versionId);
                                                        }
                                                }