/** * Return all the visible modules * * @return CModule[] */ static function getVisibleModules() { $listReadable = array(); $listModules = CModule::getVisible(); foreach ($listModules as $module) { if (CPermModule::getViewModule($module->mod_id, PERM_READ)) { $listReadable[$module->mod_name] = $module; } } return $listReadable; }
$session_lifetime_enum = array(); foreach ($session_lifetime_values as $_enum) { if ($_enum <= $session_lifetime) { $session_lifetime_enum[] = $_enum; } } if (!empty($session_lifetime_enum)) { $session_lifetime_enum = implode("|", $session_lifetime_enum); } } $smarty = new CSmartyDP(); // Tasking if (CModule::getActive("tasking") && CModule::getVisible('tasking')) { $tasking = CTaskingTicket::getPrefs($prefs, $user); $smarty->assign("owners", $tasking["owners"]); $smarty->assign("request_ticket", $tasking["request_ticket"]); } // oxExploitation if (CModule::getActive("oxExploitation") && CModule::getVisible('oxExploitation')) { $customers = COXOperation::getPrefs($prefs, $user); $smarty->assign("customers", $customers); } $smarty->assign("user", $user); $smarty->assign("prof", $prof); $smarty->assign("user_id", $user_id); $smarty->assign("locales", $locales); $smarty->assign("styles", $styles); $smarty->assign("modules", $modules); $smarty->assign("prefs", $prefs); $smarty->assign("session_lifetime_enum", $session_lifetime_enum); $smarty->display("edit_prefs.tpl");
/** * True if the module is visible * Example: {"dPfiles"|module_visible} * * @param string $module The module name * * @return CModule The module object if visible, null otherwise */ function module_visible($module) { return CModule::getVisible($module); }