Project

General

Profile

Bug #77513 ยป Fix_the_relation_handler_workspace_bug_for_types_different_to_inline.patch

Gleb Levitin, 2016-08-29 17:27

View differences:

typo3/sysext/core/Classes/Database/RelationHandler.php (revision )
// Get ID as the right value:
$theID = $this->secondTable ? abs((int)$theID) : (int)$theID;
// Register ID/table name in internal arrays:
if ($theTable !== '' && $theTable !== '_NO_TABLE') {
$this->itemArray[$key]['id'] = $this->getLiveDefaultId($theTable, $theID);
} else {
$this->itemArray[$key]['id'] = $theID;
$this->itemArray[$key]['id'] = $theID;
}
$this->itemArray[$key]['table'] = $theTable;
$this->tableArray[$theTable][] = $theID;
// Set update-flag:
......
}
// Fetch live record data
if ($this->useLiveReferenceIds) {
foreach ($this->itemArray as &$item) {
$item['id'] = $this->getLiveDefaultId($item['table'], $item['id']);
}
// Directly overlay workspace data
} else {
if (!$this->useLiveReferenceIds) {
$this->itemArray = array();
$foreignTable = $configuration['foreign_table'];
$ids = $this->getResolver($foreignTable, $this->tableArray[$foreignTable])->get();
    (1-1/1)