0010155v2.diff

Administrator Admin, 2009-02-03 20:52

Download (3.99 KB)

View differences:

t3lib/config_default.php (working copy)
329 329
			'cliKeys' => array(	// Arrays of EXT:file and module name pairs. See EXT:lowlevel/ext_localconf.php for example.
330 330
			)
331 331
		),
332
		't3lib/class.t3lib_tsfebeuserauth.php' => array(
333
			'frontendEditingController' => array(
334
				'default' => 't3lib/class.t3lib_frontendedit.php:t3lib_frontendedit'
335
			)
336
		)
332 337
	),
333 338
	'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';
334 339
//		'--key--' => array()
t3lib/class.t3lib_tsfebeuserauth.php (working copy)
179 179
		if (is_array($this->extAdminConfig['enable.'])) {
180 180
			foreach($this->extAdminConfig['enable.'] as $key => $value) {
181 181
				if ($value) {
182
						// @todo	Add support for controller switching (ie. TV controller)
183
					require_once(PATH_t3lib . 'class.t3lib_frontendedit.php');
184
					$classname = 't3lib_frontendedit';
185
					$this->frontendEdit = t3lib_div::makeInstance($classname);
182
					if ($GLOBALS['TSFE'] instanceof tslib_fe) {
183
							// Grab the Page TSConfig property that determines which controller to use.
184
						$pageTSConfig = $GLOBALS['TSFE']->getPagesTSconfig();
185
						$controllerKey = isset($pageTSConfig['TSFE.']['frontendEditingController']) ? $pageTSConfig['TSFE.']['frontendEditingController'] : 'default';
186
					} else {
187
						$controllerKey = 'default';
188
					}
189
					
190
					$controllerClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController'][$controllerKey];
191
					if ($controllerClass) {
192
						$this->frontendEdit = t3lib_div::getUserObj($controllerClass, false);
193
					}
194

  
186 195
					break;
187 196
				}
188 197
			}
typo3/sysext/cms/tslib/index_ts.php (working copy)
242 242
			$BE_USER->fetchGroupData();
243 243
			$TSFE->beUserLogin = 1;
244 244
		}
245
		if ($BE_USER->checkLockToIP() && $BE_USER->checkBackendAccessSettingsFromInitPhp() && $BE_USER->user['uid']) {
246
			$BE_USER->initializeFrontendEdit();
247
		} else {	// Unset the user initialization.
245
			// Unset the user initialization.
246
		if (!$BE_USER->checkLockToIP() || !$BE_USER->checkBackendAccessSettingsFromInitPhp() || !$BE_USER->user['uid']) {
248 247
			$BE_USER='';
249 248
			$TSFE->beUserLogin=0;
250 249
		}
......
301 300
	$TSFE->makeCacheHash();
302 301
$TT->pull();
303 302

  
304

  
305
// *****************************************
306
// Frontend editing
307
// *****************************************
308
if ($TSFE->beUserLogin && ($BE_USER->frontendEdit instanceof t3lib_frontendedit))	{
309
	require_once(t3lib_extMgm::extPath('lang').'lang.php');
310
	$LANG = t3lib_div::makeInstance('language');
311
	$LANG->init($BE_USER->uc['lang']);
312

  
313
	$BE_USER->frontendEdit->initConfigOptions();
314
}
315

  
316

  
317 303
// *******************************************
318 304
// Get compressed $TCA-Array();
319 305
// After this, we should now have a valid $TCA, though minimized
......
343 329
// ******************************************************
344 330
$TSFE->getConfigArray();
345 331

  
332
// *****************************************
333
// Frontend editing
334
// *****************************************
335
if ($TSFE->beUserLogin) {
336
	$BE_USER->initializeFrontendEdit();
337
	if ($BE_USER->frontendEdit instanceof t3lib_frontendedit) {
338
		require_once(t3lib_extMgm::extPath('lang').'lang.php');
339
		$LANG = t3lib_div::makeInstance('language');
340
		$LANG->init($BE_USER->uc['lang']);
346 341

  
342
		$BE_USER->frontendEdit->initConfigOptions();
343
	}
344
}
345

  
347 346
// ********************************
348 347
// Convert POST data to internal "renderCharset" if different from the metaCharset
349 348
// *******************************