[TYPO3-ect] lib/div feedback

Steve Ryan stever at syntithenai.com
Thu Apr 26 23:41:48 CEST 2007


Hi,
  two suggested patches for lib/div

1. Provide a constant entry point to a subcontroller so that any logic
applied to all methods (eg authentication) can be performed.
Implementation by checking for an init method in the subcontroller at
the end of the main function in tx_lib_controller.
-------------------------------------------------
if (method_exists($controller,'init')) {
	$controller->init();	
}
return $controller->$action();
-------------------------------------------------



2. Merging of configuration (TS/flexforms). Flexforms should only
override existing TS configuration if there is a value set.
In class tx_lib_configurations, at the end of the loadFlexForm method.
-------------------------------------------------
foreach((array) $data as $sheet => $languages) {
	foreach((array) $languages[$languagePointer] as $key => $def) {
		// stever 26/4/07 : don't override default config when flexform value
is empty
		if (strlen(trim($def[$valuePointer]))>0) $this->set($key,
$def[$valuePointer]);
	}
}
-------------------------------------------------

cheers

Steve Ryan


More information about the TYPO3-team-extension-coordination mailing list