Index: pages/index/IndexHandler.inc.php =================================================================== RCS file: /cvs/ojs2/pages/index/IndexHandler.inc.php,v --- pages/index/IndexHandler.inc.php 1 Sep 2009 02:00:16 -0000 1.40 +++ pages/index/IndexHandler.inc.php 10 Dec 2009 22:22:21 -0000 @@ -28,18 +28,21 @@ /** * If no journal is selected, display list of journals. * Otherwise, display the index page for the selected journal. + * @param $args array + * @param $request Request */ - function index($args) { + function index($args, &$request) { $this->validate(); $this->setupTemplate(); + $router =& $request->getRouter(); $templateMgr =& TemplateManager::getManager(); $journalDao =& DAORegistry::getDAO('JournalDAO'); - $journalPath = Request::getRequestedJournalPath(); + $journalPath = $router->getRequestedContextPath($request, CONTEXT_JOURNAL, false); $templateMgr->assign('helpTopicId', 'user.home'); if ($journalPath != 'index' && $journalDao->journalExistsByPath($journalPath)) { - $journal =& Request::getJournal(); + $journal =& $router->getContext($request, CONTEXT_JOURNAL); // Assign header and content for home page $templateMgr->assign('displayPageHeaderTitle', $journal->getLocalizedPageHeaderTitle(true)); @@ -73,18 +76,18 @@ $templateMgr->assign('announcements', $announcements); $templateMgr->assign('enableAnnouncementsHomepage', $enableAnnouncementsHomepage); } - } + } $templateMgr->display('index/journal.tpl'); } else { $siteDao =& DAORegistry::getDAO('SiteDAO'); $site =& $siteDao->getSite(); if ($site->getRedirect() && ($journal = $journalDao->getJournal($site->getRedirect())) != null) { - Request::redirect($journal->getPath()); + $request->redirect($journal->getPath()); } $templateMgr->assign('intro', $site->getLocalizedIntro()); - $templateMgr->assign('journalFilesPath', Request::getBaseUrl() . '/' . Config::getVar('files', 'public_files_dir') . '/journals/'); + $templateMgr->assign('journalFilesPath', $request->getBaseUrl() . '/' . Config::getVar('files', 'public_files_dir') . '/journals/'); $journals =& $journalDao->getEnabledJournals(); $templateMgr->assign_by_ref('journals', $journals); $templateMgr->setCacheability(CACHEABILITY_PUBLIC);