Project

General

Profile

Feature #20838 » 11652.diff

Administrator Admin, 2009-08-05 19:46

View differences:

t3lib/class.t3lib_loadmodules.php (working copy)
* @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();
......
// 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 {
(1-1/3)