Minahito
minah****@users*****
2006年 5月 24日 (水) 18:43:53 JST
Index: xoops2jp/html/modules/user/class/mailjob.php diff -u xoops2jp/html/modules/user/class/mailjob.php:1.1.2.4 xoops2jp/html/modules/user/class/mailjob.php:1.1.2.5 --- xoops2jp/html/modules/user/class/mailjob.php:1.1.2.4 Thu Apr 27 19:26:11 2006 +++ xoops2jp/html/modules/user/class/mailjob.php Wed May 24 18:43:53 2006 @@ -47,10 +47,6 @@ $root->mEventManager->add("Module.User.Mailjob.ReplaceBody", new XCube_InstanceDelegate($this, "getReplaceBody")); - if ($this->get('is_pm')) { - $root->mEventManager->add("Module.User.Mailjob.Send", new XCube_InstanceDelegate($this, "sendPM")); - } - $this->loadUser(); $handler =& xoops_getmodulehandler('mailjob_link', 'user'); @@ -83,62 +79,6 @@ $eventArgs['body'] = str_replace('{X_UEMAIL}', $eventArgs['to_user']->get('email'), $eventArgs['body']); // TODO {X_UACTLINK} } - - function sendPM(&$sender, &$eventArgs) - { - $root =& XCube_Root::getSingleton(); - $serviceMgr =& $root->getServiceManager(); - $pmService =& $serviceMgr->searchXCubeService('PrivateMessage'); - - $pmClient =& new XCube_ServiceClient($pmService); - - // - // Convert body message. - // - $replaceEventArgs = array(); - $replaceEventArgs['body'] = $eventArgs['mailjob']->get('body'); - $replaceEventArgs['to_user'] =& $eventArgs['to_user']; - $replaceEventArgs['from_user'] =& $eventArgs['from_user']; - $replaceEventArgs['mailjob'] =& $eventArgs['mailjob']; - $root->mEventManager->raiseEvent('Module.User.Mailjob.ReplaceBody', $this, $replaceEventArgs); - - $param = array( - 'to_uid' => $eventArgs['to_user']->get('uid'), - 'from_uid' => $eventArgs['from_user']->get('uid'), - 'subject' => $eventArgs['mailjob']->get('title'), - 'message' => $replaceEventArgs['body'] - ); - - $result =& $pmClient->call('send', $param); - } - - function sendMail(&$sender, &$eventArgs) - { - $root =& XCube_Root::getSingleton(); - $serviceMgr =& $root->getServiceManager(); - $pmService =& $serviceMgr->searchXCubeService('PrivateMessage'); - - $pmClient =& new XCube_ServiceClient($pmService); - - // - // Convert body message. - // - $replaceEventArgs = array(); - $replaceEventArgs['body'] = $eventArgs['mailjob']->get('body'); - $replaceEventArgs['to_user'] =& $eventArgs['to_user']; - $replaceEventArgs['from_user'] =& $eventArgs['from_user']; - $replaceEventArgs['mailjob'] =& $eventArgs['mailjob']; - $root->mEventManager->raiseEvent('Module.User.Mailjob.ReplaceBody', $this, $replaceEventArgs); - - $param = array( - 'to_uid' => $eventArgs['to_user']->get('uid'), - 'from_uid' => $eventArgs['from_user']->get('uid'), - 'subject' => $eventArgs['mailjob']->get('title'), - 'message' => $replaceEventArgs['body'] - ); - - $result =& $pmClient->call('send', $param); - } } class UserMailjobHandler extends XoopsObjectGenericHandler