[xoops-cvslog 5869] CVS update: xoops2jp/html/modules/pm/preload

Back to archive index

Minahito minah****@users*****
2006年 11月 16日 (木) 17:16:19 JST


Index: xoops2jp/html/modules/pm/preload/Preload.class.php
diff -u xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.6.2.1 xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.6.2.2
--- xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.6.2.1	Wed Nov 15 19:42:27 2006
+++ xoops2jp/html/modules/pm/preload/Preload.class.php	Thu Nov 16 17:16:19 2006
@@ -20,42 +20,77 @@
 	
 	function accessToReadpmsg()
 	{
+		//
+		// Boot the action frame of the user module directly.
+		//
 		$root =& XCube_Root::getSingleton();
-		$root->mController->executeForward(XOOPS_MODULE_URL . "/pm/index.php?action=read&msg_id=" . intval(xoops_getrequest('msg_id')));
+		$root->mController->executeHeader();
+		
+		$root->mController->setupModuleContext('pm');
+		$root->mLanguageManager->loadModuleMessageCatalog('pm');
+		
+		require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php";
+
+		$actionName = xoops_getrequest('action') == 'DeleteOne' ? 'DeleteOne' : 'read';
+		
+		$moduleRunner =& new Pm_ActionFrame(false);
+		$moduleRunner->setActionName($actionName);
+
+		$root->mController->mExecute->add(array(&$moduleRunner, 'execute'));
+
+		$root->mController->execute();
+		
+		$root->mController->executeView();
 	}
 
 	function accessToViewpmsg()
 	{
+		//
+		// Boot the action frame of the user module directly.
+		//
 		$root =& XCube_Root::getSingleton();
-		$root->mController->executeForward(XOOPS_MODULE_URL . "/pm/index.php");
+		$root->mController->executeHeader();
+		
+		$root->mController->setupModuleContext('pm');
+		$root->mLanguageManager->loadModuleMessageCatalog('pm');
+		
+		require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php";
+
+		$actionName = xoops_getrequest('action') == 'delete' ? 'delete' : 'default';
+		
+		$moduleRunner =& new Pm_ActionFrame(false);
+		$moduleRunner->setActionName($actionName);
+
+		$root->mController->mExecute->add(array(&$moduleRunner, 'execute'));
+
+		$root->mController->execute();
+		
+		$root->mController->executeView();
 	}
 	
 	function accessToPmlite()
 	{
-		$root =& XCube_Root::getSingleton();
-		
 		//
-		// Does this access request reply mode?
+		// Boot the action frame of the user module directly.
 		//
-		$params = array();
-		if (xoops_getrequest('reply') != null) {
-			$params[] = "reply=" . (xoops_getrequest('reply') ? 1 : 0);
-		}
-		
-		if (xoops_getrequest('msg_id') != null) {
-			$params[] = "msg_id=" . intval(xoops_getrequest('msg_id'));
-		}
-		
-		if (xoops_getrequest('to_userid') != null) {
-			$params[] = "to_userid=" . intval(xoops_getrequest('to_userid'));
-		}
-		
-		if (count($params) > 0) {
-			$root->mController->executeForward(XOOPS_MODULE_URL . "/pm/pmlite.php?" . implode('&', $params));
-		}
-		else {
-			$root->mController->executeForward(XOOPS_MODULE_URL . "/pm/pmlite.php");
-		}
+		$root =& XCube_Root::getSingleton();
+		$root->mController->executeHeader();
+		
+		$root->mController->setupModuleContext('pm');
+		$root->mLanguageManager->loadModuleMessageCatalog('pm');
+		
+		$root->mController->setDialogMode(true);
+
+		require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php";
+
+		$moduleRunner =& new Pm_ActionFrame(false);
+		$moduleRunner->setActionName('pmlite');
+
+		$root->mController->mExecute->add(array(&$moduleRunner, 'execute'));
+
+		$root->mController->execute();
+		
+		$root->mController->executeView();
 	}
 
 }


xoops-cvslog メーリングリストの案内
Back to archive index