From: Franz Koch Date: Wed, 1 Dec 2010 12:35:09 +0000 (+0000) Subject: [+BUGFIX] Extbase (Configuration): change the order of methods to determine the curre... X-Git-Tag: TYPO3_6-2-0alpha1~21^2~506 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/2b82299d74b6ef19ac009ead908a48d3c5338b0c [+BUGFIX] Extbase (Configuration): change the order of methods to determine the current pageId for backend modules, which is used to fetch the TS framework configuration. Fixes #11205 --- diff --git a/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php b/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php index d2c806f89bb5..da2bb6e25a39 100644 --- a/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php +++ b/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php @@ -111,18 +111,18 @@ class Tx_Extbase_Configuration_BackendConfigurationManager extends Tx_Extbase_Co return $pageId; } - // get root template - $rootTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pid', 'sys_template', 'deleted=0 AND hidden=0 AND root=1', '', '', '1'); - if (count($rootTemplates) > 0) { - return $rootTemplates[0]['pid']; - } - // get current site root $rootPages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'deleted=0 AND hidden=0 AND is_siteroot=1', '', '', '1'); if (count($rootPages) > 0) { return $rootPages[0]['uid']; } + // get root template + $rootTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pid', 'sys_template', 'deleted=0 AND hidden=0 AND root=1', '', '', '1'); + if (count($rootTemplates) > 0) { + return $rootTemplates[0]['pid']; + } + // fallback return self::DEFAULT_BACKEND_STORAGE_PID; }