Commit 299fc687 authored by Fabian Galinski's avatar Fabian Galinski 😾

[BUGFIX] The visibility is always true for other tables than pages or tt_content

parent dc08ee3c
......@@ -91,7 +91,7 @@ class ElementFactory {
$element = $hookObj->getElementForTable($table, $row['uid'], $row, $overlay_ids);
}
} elseif (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['languagevisibility']['recordElementSupportedTables'][$table])) {
$element = $this->getElementInstance(RecordElement::class, $row);
$element = GeneralUtility::makeInstance(RecordElement::class, $row, $table);
} else {
throw new TableNotSupportedException($table . ' not supported ', 1195039394);
}
......@@ -102,15 +102,4 @@ class ElementFactory {
return $element;
}
/**
* Gets instance depending on TYPO3 version
*
* @param string $name name of the class
* @param array $row row that is used to initialize element instance
* @return Object
*/
private function getElementInstance($name, $row) {
return GeneralUtility::makeInstance($name, $row);
}
}
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