Commit c02ff6dd authored by Kevin Ditscheid's avatar Kevin Ditscheid

[BUGFIX] Fix isOverlayRecord check

parent 892c183a
...@@ -109,11 +109,16 @@ class BackendServices extends AbstractServices { ...@@ -109,11 +109,16 @@ class BackendServices extends AbstractServices {
$result = FALSE; $result = FALSE;
if (in_array($table, VisibilityService::getSupportedTables(), TRUE)) { if (in_array($table, VisibilityService::getSupportedTables(), TRUE)) {
$tanslationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']; $translationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
if ($tanslationIdField !== '') { if ($translationIdField !== '') {
// if the field which points to the original of the translation is // if the field which points to the original of the translation is
// not 0 a translation exists and we have an overlay record // 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