TYPO3 CMS  TYPO3_6-2
mod.php
Go to the documentation of this file.
1 <?php
19 unset($MCONF);
20 require __DIR__ . '/init.php';
21 // Find module path:
22 $moduleName = (string)\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('M');
23 $isDispatched = FALSE;
25 if (!$formprotection->validateToken(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('moduleToken'), 'moduleCall', $moduleName)) {
26  throw new UnexpectedValueException('Invalid form/module token detected. Access Denied!', 1392409507);
27 }
28 if ($temp_path = $TBE_MODULES['_PATHS'][$moduleName]) {
30  require $temp_path . 'conf.php';
31  $BACK_PATH = '';
32  require $temp_path . 'index.php';
33  $isDispatched = TRUE;
34 } else {
35  if (is_array($TBE_MODULES['_dispatcher'])) {
36  foreach ($TBE_MODULES['_dispatcher'] as $dispatcherClassName) {
37  $dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get($dispatcherClassName);
38  if ($dispatcher->callModule($moduleName) === TRUE) {
39  $isDispatched = TRUE;
40  break;
41  }
42  }
43  }
44 }
45 if ($isDispatched === FALSE) {
46  throw new UnexpectedValueException('No module "' . htmlspecialchars($moduleName) . '" could be found.', 1294585070);
47 }
$MCONF['navFrameScript']
Definition: conf.php:4
$moduleName
Definition: mod.php:22
$formprotection
Definition: mod.php:24
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
$BACK_PATH
Definition: conf.php:3
$isDispatched
Definition: mod.php:23