Commit 2d997d8b authored by Kevin Ditscheid's avatar Kevin Ditscheid

[BUGFIX] Fix wrongly checked language overlay in backend service

parent 04a8e380
......@@ -274,6 +274,10 @@ class TceMainHook {
* @internal param object $this
*/
public function checkRecordUpdateAccess($table, $id, $data, $res, $tcemain): ?int {
if (!BackendServices::isSupportedTable($table)) {
return $res;
}
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$row = $queryBuilder->select('*')
......
......@@ -113,7 +113,7 @@ class BackendServices extends AbstractServices {
if ($tanslationIdField !== '') {
// if the field which points to the original of the translation is
// not 0 a translation exists and we have an overlay record
$result = (int) $row[$tanslationIdField][0] !== 0;
$result = $row[$tanslationIdField] !== 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