$_GET['mod'] = isset($_GET['mod']) ? $_GET['mod'] : ''; if (trim($_GET['mod']) == '') { $load_module = $db->selectOne('menu', 'mod', "`home`=1 AND (`language`='" . $current_language . "' OR `language`='') AND (`domainid`=" . $d_id . " OR `domainid`=0)"); $_GET['mod'] = $load_module; } $start['mod'] = microtime(true); // open the module if ($config->get('core', 'maintenance') == 1) { if (!$rights->isAllowed('admin', 'config')) { $_GET['mod'] = $_GET['mod'] == 'admin' || $_GET['mod'] == 'login' ? $_GET['mod'] : 'maintenance'; } $notify->add($lang->get('maintenance'), $config->get('core', 'maintenance_description')); } if ($mod->modExists($_GET['mod'])) { if ($config->get('core', 'link-mod-to-menu') != '1' || $mod->isInMenu($_GET['mod'])) { $mod->run($_GET['mod']); } else { $mod->run('noaccess'); } } else { // If the mod doesn't exist, it could be a static page if ($content->pageExists($_GET['mod'])) { $_GET['key'] = $_GET['mod']; $_GET['mod'] = 'content'; $mod->run('content'); } else { if ($mod->modExists('404')) { $mod->run('404'); } else { $notify->raiseError('Module', "The module '404' has been removed from the mod/default folder."); }