[FEATURE] Improve information for detail view
authorFrancois Suter <francois@typo3.org>
Tue, 14 Jun 2011 15:41:51 +0000 (17:41 +0200)
committerFrancois Suter <francois@typo3.org>
Tue, 14 Jun 2011 20:39:10 +0000 (22:39 +0200)
The row details view in the Workspaces module is based on two arrays
containing only the changed fields, one with the Live value of the
fields and one with the diff'ed values. These arrays do not contain
any reference to the name of the fields, only to their labels.

Add an extra entry for each difference, containing the field name.

Change-Id: Ie2b4088a568a4f9880afdf44e3b5f95cf95215fc
Resolves: #27442
Releases: 4.6, 4.5

typo3/sysext/workspaces/Classes/ExtDirect/Server.php

index a08792b..0d2b9c2 100644 (file)
@@ -121,19 +121,23 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
                                                $liveThumb = t3lib_BEfunc::thumbCode($liveRecord, $parameter->table, $fieldName, '');
 
                                                $diffReturnArray[] = array(
+                                                       'field' => $fieldName,
                                                        'label' => $fieldTitle,
                                                        'content' => $versionThumb
                                                );
                                                $liveReturnArray[] = array(
+                                                       'field' => $fieldName,
                                                        'label' => $fieldTitle,
                                                        'content' => $liveThumb
                                                );
                                        } else {
                                                $diffReturnArray[] = array(
+                                                       'field' => $fieldName,
                                                        'label' => $fieldTitle,
                                                        'content' => $t3lib_diff->makeDiffDisplay($liveRecord[$fieldName], $versionRecord[$fieldName]) // call diff class to get diff
                                                );
                                                $liveReturnArray[] = array(
+                                                       'field' => $fieldName,
                                                        'label' => $fieldTitle,
                                                        'content' => $liveRecord[$fieldName]
                                                );
@@ -204,4 +208,4 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/Server.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/Server.php']);
 }
-?>
\ No newline at end of file
+?>