Fix_the_relation_handler_workspace_bug_for_types_different_to_inline.patch

Gleb Levitin, 2016-08-29 17:27

Download (1.77 KB)

View differences:

typo3/sysext/core/Classes/Database/RelationHandler.php (revision )
418 418
                        // Get ID as the right value:
419 419
                        $theID = $this->secondTable ? abs((int)$theID) : (int)$theID;
420 420
                        // Register ID/table name in internal arrays:
421
                        if ($theTable !== '' && $theTable !== '_NO_TABLE') {
422
                            $this->itemArray[$key]['id'] = $this->getLiveDefaultId($theTable, $theID);
423
                        } else {
421
                        $this->itemArray[$key]['id'] = $theID;
424
                            $this->itemArray[$key]['id'] = $theID;
425
                        }
422 426
                        $this->itemArray[$key]['table'] = $theTable;
423 427
                        $this->tableArray[$theTable][] = $theID;
424 428
                        // Set update-flag:
......
442 446
            }
443 447

  
444 448
            // Fetch live record data
445
            if ($this->useLiveReferenceIds) {
446
                foreach ($this->itemArray as &$item) {
447
                    $item['id'] = $this->getLiveDefaultId($item['table'], $item['id']);
448
                }
449
            // Directly overlay workspace data
450
            } else {
449
            if (!$this->useLiveReferenceIds) {
451 450
                $this->itemArray = array();
452 451
                $foreignTable = $configuration['foreign_table'];
453 452
                $ids = $this->getResolver($foreignTable, $this->tableArray[$foreignTable])->get();