Skip to content

Commit 96c5080

Browse files
committed
[CLEANUP] Remove deprecated feature skipRecordsIfNoPageChange
1 parent 89ad0eb commit 96c5080

File tree

1 file changed

+6
-49
lines changed

1 file changed

+6
-49
lines changed

Classes/Domain/Repository/CommonRepository.php

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
use In2code\In2publishCore\Domain\Model\Record;
3131
use In2code\In2publishCore\Domain\Model\RecordInterface;
3232
use In2code\In2publishCore\Domain\Service\ReplaceMarkersService;
33-
use In2code\In2publishCore\Utility\ArrayUtility;
3433
use In2code\In2publishCore\Utility\DatabaseUtility;
3534
use In2code\In2publishCore\Utility\FileUtility;
3635
use TYPO3\CMS\Core\Database\DatabaseConnection;
@@ -471,59 +470,17 @@ public function enrichPageRecord(Record $record, array $excludedTableNames)
471470
}
472471
$recordIdentifier = $record->getIdentifier();
473472
foreach ($this->tcaService->getAllTableNames($excludedTableNames) as $tableName) {
474-
if (!$this->skipRecordRelation($tableName, $record)) {
475-
if ($this->shouldSkipSearchingForRelatedRecordByTable($record, $tableName)) {
476-
continue;
477-
}
478-
$previousTableName = $this->replaceTableName($tableName);
479-
$record->addRelatedRecords($this->findByProperty('pid', $recordIdentifier));
480-
$this->tableName = $previousTableName;
481-
} else {
482-
$this->logger->debug(
483-
'Records in this page skipped because of "skipRecordsIfNoPageChange"',
484-
array('page' => $recordIdentifier, 'tableName' => $tableName)
485-
);
473+
if ($this->shouldSkipSearchingForRelatedRecordByTable($record, $tableName)) {
474+
continue;
486475
}
476+
$previousTableName = $this->replaceTableName($tableName);
477+
$relatedRecords = $this->findByProperty('pid', $recordIdentifier);
478+
$record->addRelatedRecords($relatedRecords);
479+
$this->tableName = $previousTableName;
487480
}
488481
return $record;
489482
}
490483

491-
/**
492-
* Check if this content relation could be skipped by looking into the last sys_log entry for the current page and
493-
* compare local and foreign. If there are no differences, relation could be skipped
494-
*
495-
* @param string $tableName
496-
* @param Record $record
497-
* @return bool
498-
*/
499-
protected function skipRecordRelation($tableName, Record $record)
500-
{
501-
if ($record->isPagesTable() && $tableName !== 'pages') {
502-
// check if this test wasn't done before
503-
if (!array_key_exists($record->getIdentifier(), $this->skipRecords)) {
504-
$localLog = $this->findLastPropertiesByPropertyAndTableName(
505-
$this->localDatabase,
506-
'sys_log',
507-
'event_pid',
508-
$record->getIdentifier()
509-
);
510-
$foreignLog = $this->findLastPropertiesByPropertyAndTableName(
511-
$this->foreignDatabase,
512-
'sys_log',
513-
'event_pid',
514-
$record->getIdentifier()
515-
);
516-
$differences = ArrayUtility::compareArrays($localLog, $foreignLog, array('uid'));
517-
$result = empty($differences);
518-
$this->skipRecords[$record->getIdentifier()] = $result;
519-
return $result;
520-
} else {
521-
return $this->skipRecords[$record->getIdentifier()];
522-
}
523-
}
524-
return false;
525-
}
526-
527484
/**
528485
* @param Record $record
529486
* @param array $columnConfiguration

0 commit comments

Comments
 (0)