/** * If a scheduled conference in a conference is specified, display it. * If no scheduled conference is specified, display a list of scheduled conferences. * If no conference is specified, display list of conferences. */ function index($args) { $this->validate(); $this->setupTemplate(); $conference =& Request::getConference(); $schedConf =& Request::getSchedConf(); if ($schedConf && $conference) { // A scheduled conference was specified; display it. import('pages.schedConf.SchedConfHandler'); SchedConfHandler::index($args); } elseif ($conference) { $redirect = $conference->getSetting('schedConfRedirect'); if (!empty($redirect)) { $schedConfDao =& DAORegistry::getDAO('SchedConfDAO'); $redirectSchedConf =& $schedConfDao->getSchedConf($redirect, $conference->getId()); if ($redirectSchedConf) { Request::redirect($conference->getPath(), $redirectSchedConf->getPath()); } } // A scheduled conference was specified; display it. import('pages.conference.ConferenceHandler'); ConferenceHandler::index($args); } else { // Otherwise, display a list of conferences to choose from. $templateMgr =& TemplateManager::getManager(); $conferenceDao =& DAORegistry::getDAO('ConferenceDAO'); $templateMgr->assign('helpTopicId', 'user.home'); // If the site specifies that we should redirect to a specific conference // by default, do it. $siteDao =& DAORegistry::getDAO('SiteDAO'); $site =& $siteDao->getSite(); $conference = $conferenceDao->getConference($site->getRedirect()); if ($site->getRedirect() && $conference) { Request::redirect($conference->getPath()); } // Otherwise, show a list of hosted conferences. $templateMgr->assign('intro', $site->getLocalizedIntro()); $conferences =& $conferenceDao->getEnabledConferences(); $templateMgr->assign_by_ref('conferences', $conferences); $templateMgr->setCacheability(CACHEABILITY_PUBLIC); $templateMgr->display('index/site.tpl'); } }