Project

General

Profile

Bug #65126 » patch.diff

Dominique Kreemers, 2015-03-17 09:43

View differences:

typo3/sysext/version/Classes/Dependency/ElementEntity.php
* @return array
*/
public function getRecord() {
if (empty($this->record['uid']) || (int)$this->record['uid'] !== $this->id) {
if ($GLOBALS['TCA'][$this->getTable()]['ctrl']['versioningWS'] && (empty($this->record['uid']) || (int)$this->record['uid'] !== $this->id)) {
$this->record = array();
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid,t3ver_wsid,t3ver_state,t3ver_oid', $this->getTable(), 'uid=' . $this->getId());
if (is_array($rows)) {
$this->record = $rows[0];
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid,pid,t3ver_wsid,t3ver_state,t3ver_oid', $this->getTable(), 'uid=' . $this->getId());
if (is_array($row)) {
$this->record = $row;
}
} else {
$this->record = array();
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid,pid', $this->getTable(), 'uid=' . $this->getId());
if (is_array($row)) {
$this->record = $row;
}
}
return $this->record;
}
typo3/sysext/version/Classes/Dependency/ElementEntityProcessor.php
*/
public function createNewDependentElementChildReferenceCallback(array $callerArguments, array $targetArgument, ElementEntity $caller, $eventName) {
$fieldConfiguration = BackendUtility::getTcaFieldConfiguration($caller->getTable(), $callerArguments['field']);
if (!$fieldConfiguration || !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration))) {
if (!$fieldConfiguration || ($fieldConfiguration['type'] !== 'flex' && !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration)))) {
return ElementEntity::RESPONSE_Skip;
}
return NULL;
......
*/
public function createNewDependentElementParentReferenceCallback(array $callerArguments, array $targetArgument, ElementEntity $caller, $eventName) {
$fieldConfiguration = BackendUtility::getTcaFieldConfiguration($callerArguments['table'], $callerArguments['field']);
if (!$fieldConfiguration || !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration))) {
if (!$fieldConfiguration || ($fieldConfiguration['type'] !== 'flex' && !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration)))) {
return ElementEntity::RESPONSE_Skip;
}
return NULL;
(4-4/6)