Minahito
minah****@users*****
2006年 7月 7日 (金) 11:54:05 JST
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.44 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.45 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.44 Sat Jul 1 16:26:04 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Fri Jul 7 11:54:05 2006 @@ -36,6 +36,16 @@ */ var $mSiteLogin = null; + /** + * @var XCube_Delegate + */ + var $mGetCountUnreadPM = null; + + /** + * @var XCube_Delegate + */ + var $mGetPMInboxUrl = null; + function Legacy_Controller() { // @@ -43,6 +53,9 @@ // $this->mSiteLogin =& new XCube_NewDelegate(); $this->mSiteLogin->register("Site.Login"); + + $this->mGetCountUnreadPM =& new XCube_NewDelegate(); + $this->mGetPMInboxUrl =& new XCube_NewDelegate(); set_magic_quotes_runtime(0); // ^^; @@ -760,6 +773,34 @@ $ret =& $this->_mControllerState->getVirtualCurrentModule($this); return $ret; } + + /** + * Return URL of pm inbox. This is X2 fixed feature. + * + * @param $uid int ID of the user + * @return string if any functions don't return value, return null. + */ + function getPMInboxUrl($uid) + { + $url = null; + $this->mGetPMInboxUrl->call(new XCube_Ref($url), $uid); + + return $url; + } + + /** + * Return counts of unread pm. This is X2 fixed feature. + * + * @param $uid int ID of the user + * @return int + */ + function getCountUnreadPM($uid) + { + $count = 0; + $this->mGetCountUnreadPM->call(new XCube_Ref($count), $uid); + + return $count; + } } /**