[TYPO3-ect] lib SVN: auto detection fails for 'user_myextname' extensions
Franz Koch
typo.removeformessage at fx-graefix.de
Thu Dec 13 19:18:22 CET 2007
Hi list,
although I know that I should stay with the TER versions of lib/div for
current extension development, I tried building a new extension with the
current SVN versions (nightly builds). As it will be a small custom
extension not worth for TER, I decided to name the extension
'user_my_extkey' and used the kickstarter__mvc for the basic setup (I
know it's not adapted to the latest lib/div changes, but that's not the
problem here). Now my folder has this naming as well as the controllers,
models and views. Using this naming scheme, which is as much as I know
the Typo3 way of naming, it's not possible to build a extension with
current lib/div, because auto detection of extension names fails.
--- class.tx_lib_controllerBase.php, starting on line 71 ---------------
function getExtensionKey() {
$class = get_class($this);
if(preg_match('/^tx_([^_]+)/', $class, $matches) ||
preg_match('/^user_([^_]+)/', $class, $matches)) {
$candidate = $matches[1];
if($candidate != 'lib') {
$keys = t3lib_div::trimExplode(',',
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extList']);
foreach($keys as $key) {
if($candidate == str_replace('_', '', $key)) {
return $key;
}
}
} else {
#...
-----------
this construct will never work for user_ extensions, because the
preg_match result copied to $candidate will not contain the string
'user_', but this string is part of the real extension key and thus no
match will be found.
Now I'm asking if this is a bug in lib, or if I use a wrong naming scheme.
Thanks for your reply.
--
Greetings,
Franz
More information about the TYPO3-team-extension-coordination
mailing list