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

Back to archive index

Minahito minah****@users*****
2006年 7月 7日 (金) 11:57:08 JST


Index: xoops2jp/html/modules/pm/preload/Preload.class.php
diff -u xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.2 xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.3
--- xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.2	Wed Jun 28 14:47:32 2006
+++ xoops2jp/html/modules/pm/preload/Preload.class.php	Fri Jul  7 11:57:08 2006
@@ -2,18 +2,27 @@
 
 if (!defined('XOOPS_ROOT_PATH')) die();
 
-class Pm_Preload extends XCube_ActionFilter {
+class Pm_Preload extends XCube_ActionFilter
+{
 	function preBlockFilter()
 	{
-		require_once XOOPS_ROOT_PATH . "/modules/pm/kernel/PmEventProxyRegister.class.php";
-		$this->mController->mRoot->mEventManager->addProxyRegister(new PmEventProxyRegister());
-		
-		/*
-		require_once XOOPS_ROOT_PATH . "/modules/pm/service/LegacyPmService.class.php";
-		$service =& new LegacyPmService();
-		$this->mController->mRoot->mServiceManager->addXCubeService("PrivateMessage", $service);
-		unset($service);
-		*/
+		$this->mController->mGetPMInboxUrl->add("Pm_Preload::getPmInboxUrl");
+		$this->mController->mGetCountUnreadPM->add("Pm_Preload::getCountUnreadPM");
+	}
+	
+	function getPmInboxUrl(&$url, $uid)
+	{
+		if ($uid > 0) {
+			$url = XOOPS_MODULE_URL . "/pm/index.php";
+		}
+	}
+	
+	function getCountUnreadPM(&$count, $uid)
+	{
+		if ($uid > 0) {
+			$handler =& xoops_gethandler('privmessage');
+			$count = $handler->getCountUnreadByFromUid($uid);
+		}
 	}
 }
 


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