Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (revision 4932) +++ t3lib/config_default.php (working copy) @@ -329,6 +329,11 @@ 'cliKeys' => array( // Arrays of EXT:file and module name pairs. See EXT:lowlevel/ext_localconf.php for example. ) ), + 't3lib/class.t3lib_tsfebeuserauth.php' => array( + 'frontendEditingController' => array( + 'default' => 't3lib/class.t3lib_frontendedit.php:t3lib_frontendedit' + ) + ) ), 'EXTCONF' => Array ( // Here you may add manually set configuration options for your extensions. Eg. $TYPO3_CONF_VARS['EXTCONF']['my_extension_key']['my_option'] = 'my_value'; // '--key--' => array() Index: t3lib/class.t3lib_tsfebeuserauth.php =================================================================== --- t3lib/class.t3lib_tsfebeuserauth.php (revision 4932) +++ t3lib/class.t3lib_tsfebeuserauth.php (working copy) @@ -179,10 +179,19 @@ if (is_array($this->extAdminConfig['enable.'])) { foreach($this->extAdminConfig['enable.'] as $key => $value) { if ($value) { - // @todo Add support for controller switching (ie. TV controller) - require_once(PATH_t3lib . 'class.t3lib_frontendedit.php'); - $classname = 't3lib_frontendedit'; - $this->frontendEdit = t3lib_div::makeInstance($classname); + if ($GLOBALS['TSFE'] instanceof tslib_fe) { + // Grab the Page TSConfig property that determines which controller to use. + $pageTSConfig = $GLOBALS['TSFE']->getPagesTSconfig(); + $controllerKey = isset($pageTSConfig['TSFE.']['frontendEditingController']) ? $pageTSConfig['TSFE.']['frontendEditingController'] : 'default'; + } else { + $controllerKey = 'default'; + } + + $controllerClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController'][$controllerKey]; + if ($controllerClass) { + $this->frontendEdit = t3lib_div::getUserObj($controllerClass, false); + } + break; } } Index: typo3/sysext/cms/tslib/index_ts.php =================================================================== --- typo3/sysext/cms/tslib/index_ts.php (revision 4932) +++ typo3/sysext/cms/tslib/index_ts.php (working copy) @@ -242,9 +242,8 @@ $BE_USER->fetchGroupData(); $TSFE->beUserLogin = 1; } - if ($BE_USER->checkLockToIP() && $BE_USER->checkBackendAccessSettingsFromInitPhp() && $BE_USER->user['uid']) { - $BE_USER->initializeFrontendEdit(); - } else { // Unset the user initialization. + // Unset the user initialization. + if (!$BE_USER->checkLockToIP() || !$BE_USER->checkBackendAccessSettingsFromInitPhp() || !$BE_USER->user['uid']) { $BE_USER=''; $TSFE->beUserLogin=0; } @@ -301,19 +300,6 @@ $TSFE->makeCacheHash(); $TT->pull(); - -// ***************************************** -// Frontend editing -// ***************************************** -if ($TSFE->beUserLogin && ($BE_USER->frontendEdit instanceof t3lib_frontendedit)) { - require_once(t3lib_extMgm::extPath('lang').'lang.php'); - $LANG = t3lib_div::makeInstance('language'); - $LANG->init($BE_USER->uc['lang']); - - $BE_USER->frontendEdit->initConfigOptions(); -} - - // ******************************************* // Get compressed $TCA-Array(); // After this, we should now have a valid $TCA, though minimized @@ -343,7 +329,20 @@ // ****************************************************** $TSFE->getConfigArray(); +// ***************************************** +// Frontend editing +// ***************************************** +if ($TSFE->beUserLogin) { + $BE_USER->initializeFrontendEdit(); + if ($BE_USER->frontendEdit instanceof t3lib_frontendedit) { + require_once(t3lib_extMgm::extPath('lang').'lang.php'); + $LANG = t3lib_div::makeInstance('language'); + $LANG->init($BE_USER->uc['lang']); + $BE_USER->frontendEdit->initConfigOptions(); + } +} + // ******************************** // Convert POST data to internal "renderCharset" if different from the metaCharset // *******************************