Bug #65725
closedReferenceIndex takes WorkspaceOverlay into account
0%
Description
State of the
if ($conf['type'] === 'flex')condition of ReferenceIndex::getRelations() before 10.04.2006 11:27:
// Get current value array: $dataStructArray = t3lib_BEfunc::getFlexFormDS($conf, $row, $table,'',$this->WSOL); $currentValueArray = t3lib_div::xml2array($value); // Traversing the XML structure, processing files: if (is_array($currentValueArray)) { $this->temp_flexRelations = array( 'db' => array(), 'file' => array(), 'softrefs' => array() ); $iteratorObj = t3lib_div::makeInstance('t3lib_TCEmain'); $iteratorObj->callBackObj = &$this; $iteratorObj->checkValue_flex_procInData( $currentValueArray['data'], array(), // Not used. array(), // Not used. $dataStructArray, array($table,$uid,$field), // Parameters. 'getRelations_flexFormCallBack' ); // Create an entry for the field: $outRow[$field] = array( 'type' => 'flex', 'flexFormRels' => $this->temp_flexRelations, ); }State after Commit 0c34dac08605ba from Michael Stucki on 10.04.2006 11:27
- Merging all changes from TYPO3_4-0 branch back into HEAD
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1421 709f56b5-9817-0410-a4d7-c38de5d9e867
// Get current value array: $dataStructArray = t3lib_BEfunc::getFlexFormDS($conf, $row, $table,'',$this->WSOL); $currentValueArray = t3lib_div::xml2array($value); // Traversing the XML structure, processing files: if (is_array($currentValueArray)) { $this->temp_flexRelations = array( 'db' => array(), 'file' => array(), 'softrefs' => array() ); // Create and call iterator object: $flexObj = t3lib_div::makeInstance('t3lib_flexformtools'); $flexObj->traverseFlexFormXMLData($table,$field,$row,$this,'getRelations_flexFormCallBack'); // Create an entry for the field: $outRow[$field] = array( 'type' => 'flex', 'flexFormRels' => $this->temp_flexRelations, ); }
Before the commit filling temp_flexRelations was done by a call to checkValue_flex_procInData passing $dataStructArray created with
$dataStructArray = t3lib_BEfunc::getFlexFormDS($conf, $row, $table,'',$this->WSOL);
After moving the functionality to t3lib_flexformtools::traverseFlexFormXMLData() (today TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools)
the parameter $this->WSOL got lost. Its not passed to the class and fetching $dataStructArray there is done by calling
$dataStructArray = BackendUtility::getFlexFormDS($GLOBALS['TCA'][$table]['columns'][$field]['config'], $row, $table, $field);
without the fifth parameter $WSOL.
$this->WSOL is defined as FALSE by default in ReferenceIndex and is overwritten with TRUE only in ImportExport::export_addRecord()
The signature of BackendUtility::getFlexFormDS looks like this:
* @param bool $WSOL If set, workspace overlay is applied to records. This is correct behaviour for all presentation and export, but NOT if you want a TRUE reflection of how things are in the live workspace. */ static public function getFlexFormDS($conf, $row, $table, $fieldName = '', $WSOL = TRUE, $newRecordPidValue = 0) {
This means:
Before the commit from Michael Stucki the ReferenceIndex passed $this->WSOL = FALSE to BackendUtility::getFlexFormDS() fetching the "TRUE reflection of how things are in the live workspace".
After the commit the parameter $WSOL defaults to TRUE in the call via FlexFormTools::traverseFlexFormXMLData() returning the record with applied workspace overlay.
I am not sure about the consequences yet.