[xoops-cvslog 3606] CVS update: xoops2jp/html/preload

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 7月 14日 (金) 17:37:24 JST


Index: xoops2jp/html/preload/IndexRedirector.class.php
diff -u xoops2jp/html/preload/IndexRedirector.class.php:1.1.2.2 xoops2jp/html/preload/IndexRedirector.class.php:1.1.2.3
--- xoops2jp/html/preload/IndexRedirector.class.php:1.1.2.2	Tue Mar 28 22:32:19 2006
+++ xoops2jp/html/preload/IndexRedirector.class.php	Fri Jul 14 17:37:24 2006
@@ -1,4 +1,7 @@
 <?php
+/**
+ * @version $Id$
+ */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
@@ -6,16 +9,17 @@
 {
 	function preBlockFilter()
 	{
-		$delegate=new XCube_Delegate("IndexRedirector", "redirect");
+		$delegate =& new XCube_Delegate("IndexRedirector", "redirect");
 		$this->mController->mRoot->mEventManager->add("Legacypage.Top.Access", $delegate);
 	}
 
 	function redirect(&$controller, &$eventArgs)
 	{
 		$startPage = $controller->getConfig('startpage');
-		if ($startPage != null && $startPage != "--") {
-			header('Location: ' . XOOPS_URL . '/modules/' . $startPage . '/');
-			exit();
+		$handler =& xoops_gethandler('module');
+		$module =& $handler->get($startPage);
+		if ($startPage != null && $startPage != "--" && !is_object($module)) {
+			$controller->executeForward(XOOPS_URL . '/modules/' . $module->getShow('dirname') . '/');
 		}
 	}
 }


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index