Minahito
minah****@users*****
2006年 7月 31日 (月) 19:01:29 JST
Index: xoops2jp/html/kernel/notification.php diff -u xoops2jp/html/kernel/notification.php:1.2.8.2 xoops2jp/html/kernel/notification.php:1.2.8.3 --- xoops2jp/html/kernel/notification.php:1.2.8.2 Tue May 16 22:25:07 2006 +++ xoops2jp/html/kernel/notification.php Mon Jul 31 19:01:28 2006 @@ -1,5 +1,5 @@ <?php -// $Id: notification.php,v 1.2.8.2 2006/05/16 13:25:07 nobunobu Exp $ +// $Id: notification.php,v 1.2.8.3 2006/07/31 10:01:28 minahito Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -170,6 +170,18 @@ */ class XoopsNotificationHandler extends XoopsObjectHandler { + /** + * @var XCube_NewDelegate + */ + var $mTrigger = null; + + function XoopsNotificationHandler(&$db) + { + parent::XoopsObjectHandler($db); + + $this->mTrigger =& new XCube_NewDelegate(); + $this->mTrigger->register('XoopsNotificationHandler.Trigger'); + } /** * Create a {@link XoopsNotification} @@ -585,7 +597,7 @@ break; } } - // RaiseEvent 'Legacy.Notify.Trigger' + // RaiseEvent 'XoopsNotificationHandler.Trigger' ('Legacy.Notify.Trigger') // Delegate may hanldle notified event // varArgs : // 'category' [I] : Paramater $category of triggerEvent() @@ -599,6 +611,7 @@ // 'force_return' [O] : If force return this triggerEvents method, set it True // if ($event_correct) { + /* $varArgs = array('category' => $category, 'event' => $event, 'itemId' => $item_id, @@ -608,11 +621,14 @@ 'omitUid' => $omit_user_id, 'eventConfig' => $not_config, 'force_return' => false, - ); - if ($result =& XCube_EventUtils::quickRaiseEvent('Legacy.Notify.Trigger', $varArgs )) { - if ($result['force_return']) return; - } + );*/ + + $force_return = false; + $this->mTrigger->call($category, $event, $item_id, $extra_tags, new XCube_Ref($module), $user_list, $omit_user_id, $not_config, new XCube_Ref($force_return)); + if ($force_return) { + return; + } } // Check if event is enabled