Skip to content

Commit

Permalink
Merge pull request FluidTYPO3#1094 from NamelessCoder/configurationma…
Browse files Browse the repository at this point in the history
…nagerfallback

[BUGFIX] Fallback to page-unaware ConfigurationManager
  • Loading branch information
cedricziel committed Mar 7, 2016
2 parents 718365c + fe31dda commit aff30de
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Classes/Service/FluxService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* LICENSE.md file that was distributed with this source code.
*/

use FluidTYPO3\Flux\Configuration\BackendConfigurationManager;
use FluidTYPO3\Flux\FluxPackage;
use FluidTYPO3\Flux\Form;
use FluidTYPO3\Flux\Form\Container\Grid;
Expand Down Expand Up @@ -352,12 +353,18 @@ public function getTypoScriptByPath($path) {
* @return array
*/
public function getAllTypoScript() {
$pageId = $this->configurationManager->getCurrentPageId();
if (FALSE === isset(self::$typoScript[$pageId])) {
self::$typoScript[$pageId] = (array) $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
self::$typoScript[$pageId] = GeneralUtility::removeDotsFromTS(self::$typoScript[$pageId]);
if (!$this->configurationManager instanceof BackendConfigurationManager) {
$typoScript = (array) $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
$typoScript = GeneralUtility::removeDotsFromTS($typoScript);
return $typoScript;
} else {
$pageId = $this->configurationManager->getCurrentPageId();
if (FALSE === isset(self::$typoScript[$pageId])) {
self::$typoScript[$pageId] = (array) $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
self::$typoScript[$pageId] = GeneralUtility::removeDotsFromTS(self::$typoScript[$pageId]);
}
return (array) self::$typoScript[$pageId];
}
return (array) self::$typoScript[$pageId];
}

/**
Expand Down

0 comments on commit aff30de

Please sign in to comment.