1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: if (!defined('XOOPS_ROOT_PATH')) exit();
12:
13: class Legacy_IndexRedirector extends XCube_ActionFilter
14: {
15: function preBlockFilter()
16: {
17: $this->mController->mRoot->mDelegateManager->add("Legacypage.Top.Access", array(&$this, "redirect"));
18: }
19:
20: function redirect()
21: {
22: $startPage = $this->mRoot->mContext->getXoopsConfig('startpage');
23: if ($startPage != null && $startPage != "--") {
24: $handler =& xoops_gethandler('module');
25: $module =& $handler->get($startPage);
26: if (is_object($module) && $module->get('isactive')) {
27: $this->mController->executeForward(XOOPS_URL . '/modules/' . $module->getShow('dirname') . '/');
28: }
29: }
30: }
31: }
32:
33: ?>
34: