Skip to content
Snippets Groups Projects
Commit ca34b59c authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refs #12588. T3 Version check seperated: BE Login=v9, SLUG & UrlBaseLang=v10

parent 006e59f4
No related branches found
No related tags found
2 merge requests!466various incl v10,!460F12588 t3 v10 migration
Pipeline #7698 passed
......@@ -100,7 +100,7 @@ class T3Info {
}
$lid = self::getLanguageId();
if ($lid !== '' && is_numeric($lid) && T3Handler::typo3VersionGreaterEqual9()) {
if ($lid !== '' && is_numeric($lid) && T3Handler::typo3VersionGreaterEqual('9.0.0')) {
$lid = intval($lid);
try {
// In an API call Typo3 might have been loaded manually by QFQ at some earlier point. But the following line does not work in that case.
......@@ -130,7 +130,7 @@ class T3Info {
*/
public static function beUserLoggedIn() {
if (T3Handler::isTypo3Loaded() && T3Handler::typo3VersionGreaterEqual9()) {
if (T3Handler::isTypo3Loaded() && T3Handler::typo3VersionGreaterEqual('9.0.0')) {
// Typo3 version >=9
$context = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Context\Context::class);
return $context->getPropertyFromAspect('backend.user', 'isLoggedIn');
......
......@@ -230,7 +230,7 @@ class T3Handler {
*
* @return bool
*/
public static function typo3VersionGreaterEqual9() {
public static function typo3VersionGreaterEqual($version) {
if (defined('PHPUNIT_QFQ')) {
// assume Typo3 version grater than 8 in unittests
return true;
......@@ -238,7 +238,7 @@ class T3Handler {
static $cache = null;
if (is_null($cache)) {
// use pageSlug notation after 10.0
$cache = version_compare(self::getTypo3Version(), '10.0.0') >= 0;
$cache = version_compare(self::getTypo3Version(), $version) >= 0;
}
return $cache;
}
......@@ -271,7 +271,7 @@ class T3Handler {
public static function useSlugsInsteadOfPageAlias() {
static $cache = null;
if (is_null($cache)) {
$cache = self::typo3VersionGreaterEqual9();
$cache = self::typo3VersionGreaterEqual('10.0.0');
}
return $cache;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment