Commit c02ff6dd authored by Kevin Ditscheid's avatar Kevin Ditscheid

[BUGFIX] Fix isOverlayRecord check

parent 892c183a
......@@ -109,11 +109,16 @@ class BackendServices extends AbstractServices {
$result = FALSE;
if (in_array($table, VisibilityService::getSupportedTables(), TRUE)) {
$tanslationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
if ($tanslationIdField !== '') {
$translationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
if ($translationIdField !== '') {
// if the field which points to the original of the translation is
// not 0 a translation exists and we have an overlay record
$result = $row[$tanslationIdField] !== 0;
if (is_array($row[$translationIdField])) {
// somehow the sys_language_uid field could contain 0 => 0
$result = (int) $row[$translationIdField][0] !== 0;
} else {
$result = (int) $row[$translationIdField] !== 0;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment