29 and tabid <> 16 and tabid <>10) order by name"; // Performance Optimization: Re-written to ignore extension and inactive modules $modulenamearr = Array(); foreach($tabrows as $resultrow) { if($resultrow['isentitytype'] != '0') { // Eliminate: Events, Emails if($resultrow['tabid'] == '16' || $resultrow['tabid'] == '10' || $resultrow['name'] == 'Webmails') { continue; } $modName=$resultrow['name']; if(isPermitted($modName,'DetailView') == 'yes' && vtlib_isModuleActive($modName)){ $modulenamearr[$modName]=array($resultrow['tabid'],$modName); } } } ksort($modulenamearr); // We avoided ORDER BY in Query (vtlib_prefetchModuleActiveInfo)! // END //Security Check done for RSS and Dashboards $allow_rss='no'; $allow_dashbd='no'; $allow_report='no'; if(isPermitted('Rss','DetailView') == 'yes' && vtlib_isModuleActive('Rss')){ $allow_rss='yes'; } if(isPermitted('Dashboard','DetailView') == 'yes' && vtlib_isModuleActive('Dashboard')){ $allow_dashbd='yes'; } if(isPermitted('Reports','DetailView') == 'yes' && vtlib_isModuleActive('Reports')){ $allow_report='yes'; } $homedetails = $homeObj->getHomePageFrame(); $maxdiv = sizeof($homedetails)-1; $user_name = $current_user->column_fields['user_name']; $buttoncheck['Calendar'] = isPermitted('Calendar','index'); $freetag = new freetag(); $numberofcols = getNumberOfColumns(); $smarty->assign("CHECK",$buttoncheck); if(vtlib_isModuleActive('Calendar')){ $smarty->assign("CALENDAR_ACTIVE","yes"); } $smarty->assign("IMAGE_PATH",$image_path); $smarty->assign("MODULE",'Home'); $smarty->assign("CATEGORY",getParenttab('Home')); $smarty->assign("CURRENTUSER",$user_name); $smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id)); $smarty->assign("MAXLEN",$maxdiv); $smarty->assign("ALLOW_RSS",$allow_rss); $smarty->assign("ALLOW_DASH",$allow_dashbd); $smarty->assign("ALLOW_REPORT",$allow_report); $smarty->assign("HOMEFRAME",$homedetails); $smarty->assign("MODULE_NAME",$modulenamearr); $smarty->assign("MOD",$mod_strings); $smarty->assign("APP",$app_strings); $smarty->assign("THEME", $theme); $smarty->assign("LAYOUT", $numberofcols); $widgetBlockSize = PerformancePrefs::getBoolean('HOME_PAGE_WIDGET_GROUP_SIZE', 12); $smarty->assign('widgetBlockSize', $widgetBlockSize); // First time login check include_once 'modules/Users/LoginHistory.php'; $accept_login_delay_seconds = 5*60; // (use..5*60 for 5 min) to overcome redirection post authentication $smarty->assign('FIRST_TIME_LOGIN', LoginHistory::firstTimeLoggedIn($current_user->user_name, $accept_login_delay_seconds)); // End $smarty->display("Home/Homestuff.tpl"); ?>