|
|
@@ -260,7 +260,7 @@ class OtWebsiteRepository
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns the typo3 site matching the current request (FE only)
|
|
|
+ * Returns the typo3 site matching the current request (FE only!)
|
|
|
*
|
|
|
* @return array
|
|
|
* @throws NoSuchWebsiteException
|
|
|
@@ -268,19 +268,24 @@ class OtWebsiteRepository
|
|
|
public function getCurrentWebsiteFromFEGlobals(): array
|
|
|
{
|
|
|
$request = $GLOBALS['TYPO3_REQUEST'];
|
|
|
- $site = $request->getAttribute('site');
|
|
|
- return $this->getWebsiteByConfigIdentifier($site->getIdentifier());
|
|
|
+ $ot_website = $GLOBALS['TYPO3_REQUEST']->getAttribute('ot_website');
|
|
|
+ if ($ot_website) {
|
|
|
+ return $ot_website;
|
|
|
+ } else {
|
|
|
+ $site = $request->getAttribute('site');
|
|
|
+ return $this->getWebsiteByConfigIdentifier($site->getIdentifier());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns the typo3 site matching the current request (FE only)
|
|
|
+ * Returns the typo3 site matching the current request (FE only!)
|
|
|
*
|
|
|
* @return int
|
|
|
* @throws NoSuchWebsiteException
|
|
|
*/
|
|
|
public function getCurrentRootpageUidFromFEGlobals(): int
|
|
|
{
|
|
|
- $website = $this->getCurrentWebSiteFromFEGlobals();
|
|
|
+ $website = $this->getCurrentWebsiteFromFEGlobals();
|
|
|
return $this->getWebsiteRootUid($website['uid']);
|
|
|
}
|
|
|
|