Skip to content

Commit

Permalink
[BUGFIX] Use correct object to call pushModuleData() method in AdminM…
Browse files Browse the repository at this point in the history
…oduleController (#225) (#227)

Resolves: #222
Releases: main, 12.4
  • Loading branch information
brotkrueml authored Nov 22, 2023
1 parent 620c88f commit 3b7b86a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Fixed
- Dynamic properties in ModuleController (#221)
- Use correct object to call pushModuleData() method in AdminModuleController (#222)

## 12.0.1 - 2023-09-16

Expand Down
8 changes: 7 additions & 1 deletion Classes/Controller/AdminModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Localization\LanguageService;
Expand Down Expand Up @@ -54,7 +55,7 @@ public function handleRequest(ServerRequestInterface $request): ResponseInterfac

$moduleData = $request->getAttribute('moduleData');
if ($moduleData->cleanUp($allowedOptions)) {
$languageService->pushModuleData($moduleData->getModuleIdentifier(), $moduleData->toArray());
$this->getBackendUser()->pushModuleData($moduleData->getModuleIdentifier(), $moduleData->toArray());
}

$moduleTemplate = $this->moduleTemplateFactory->create($request);
Expand Down Expand Up @@ -143,4 +144,9 @@ private function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}

private function getBackendUser(): BackendUserAuthentication
{
return $GLOBALS['BE_USER'];
}
}

0 comments on commit 3b7b86a

Please sign in to comment.