Skip to content

Commit 315dd47

Browse files
committed
[BUGFIX] Ignore unpublishable extension assets in simpleOverviewAndAjax
1 parent 1500124 commit 315dd47

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Classes/Domain/Factory/FakeRecordFactory.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ class FakeRecordFactory
6464
*/
6565
protected $tcaService = null;
6666

67+
/**
68+
* @var array
69+
*/
70+
protected $sysFileMetaDataBlackList = array();
71+
6772
/**
6873
* FakeRepository constructor.
6974
*/
@@ -293,6 +298,25 @@ protected function pageContentRecordsHasChanged(Record $record)
293298
protected function areDifferentArrays(array $arrayLocal, array $arrayForeign, $table)
294299
{
295300
$newLocal = $newForeign = array();
301+
302+
// remove sys file entries from local extensions and their sys_file_metadata records
303+
if ('sys_file' === $table) {
304+
foreach ($arrayLocal as $localIndex => $localSysFile) {
305+
if (0 === strpos($localSysFile['identifier'], '/typo3conf/ext/')) {
306+
if (!isset($arrayForeign[$localIndex])) {
307+
$this->sysFileMetaDataBlackList[$localIndex] = $localIndex;
308+
unset($arrayLocal[$localIndex]);
309+
}
310+
}
311+
}
312+
} elseif ('sys_file_metadata' === $table) {
313+
foreach ($arrayLocal as $localIndex => $localSysFileMeta) {
314+
if (isset($this->sysFileMetaDataBlackList[$localSysFileMeta['file']])) {
315+
unset($arrayLocal[$localIndex]);
316+
}
317+
}
318+
}
319+
296320
foreach ($arrayLocal as $subLocal) {
297321
$subLocal = $this->removeIgnoreFieldsFromArray($subLocal, $table);
298322
if (!$this->isRecordDeletedOnLocalAndNonExistingOnForeign($subLocal['uid'], $table)

Classes/Domain/Repository/TableCacheRepository.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ public function findByPid($tableName, $pageIdentifier, $databaseName = 'local')
131131
$tableName,
132132
'pid=' . (int)$pageIdentifier,
133133
'',
134+
'uid',
135+
'',
134136
'uid'
135137
);
136138
$this->cacheRecords($tableName, $rows, $databaseName);

0 commit comments

Comments
 (0)