From: Steffen Kamper Date: Mon, 10 Aug 2009 10:42:43 +0000 (+0000) Subject: Added feature #11652: Modern integration of module into backend using Extbase (thanks... X-Git-Tag: TYPO3_4-3-0beta1~289 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/d978266ff0c274e3279cca3bef1a1db1f253ce5a Added feature #11652: Modern integration of module into backend using Extbase (thanks to Xavier Perseguers): modified t3lib_loadmodules.php to allow modules without having conf.php. This is needed for extbase driven backend modules. git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5771 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index be68231ea9c3..f007c67d2945 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2009-08-10 Steffen Kamper + * Added feature #11652: Modern integration of module into backend using Extbase (thanks to Xavier Perseguers): modified t3lib_loadmodules.php to allow modules without having conf.php. This is needed for extbase driven backend modules. * Added feature #11651: Allow Extbase as framework for backend modules (thanks to Xavier Perseguers): modified mod.php to dispatch extbase driven modules 2009-08-09 Andreas Otto diff --git a/t3lib/class.t3lib_loadmodules.php b/t3lib/class.t3lib_loadmodules.php index 231c2121da12..c00117a7a9a2 100644 --- a/t3lib/class.t3lib_loadmodules.php +++ b/t3lib/class.t3lib_loadmodules.php @@ -384,7 +384,17 @@ class t3lib_loadModules { * @return mixed See description of function */ function checkMod($name, $fullpath) { - $modconf=Array(); + // Check for own way of configuring module + if (is_array($GLOBALS['TBE_EXTBASE_MODULES'][$name]['configureModuleFunction'])) { + $obj = $GLOBALS['TBE_EXTBASE_MODULES'][$name]['configureModuleFunction']; + if (is_callable($obj)) { + $MCONF = array(); + $MLANG = array(); + return call_user_func($obj, $name, $fullpath, $MCONF, $MLANG); + } + } + + $modconf = array(); $path = preg_replace('/\/[^\/.]+\/\.\.\//', '/', $fullpath); // because 'path/../path' does not work if (@is_dir($path) && file_exists($path.'/conf.php')) { $MCONF = array(); @@ -433,7 +443,11 @@ class t3lib_loadModules { // Default script setup if ($MCONF['script']==='_DISPATCH') { - $modconf['script'] = 'mod.php?M='.rawurlencode($name); + if ($MCONF['extbase']) { + $modconf['script'] = 'mod.php?M=Tx_' . rawurlencode($name); + } else { + $modconf['script'] = 'mod.php?M=' . rawurlencode($name); + } } elseif ($MCONF['script'] && file_exists($path.'/'.$MCONF['script'])) { $modconf['script'] = $this->getRelativePath(PATH_typo3,$fullpath.'/'.$MCONF['script']); } else {