[xoops-cvslog 5044] CVS update: xoops2jp/html/modules/user/admin/actions

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 10月 14日 (土) 23:17:49 JST


Index: xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php
diff -u xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php:1.1.2.4.2.1
--- xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php:1.1.2.4	Sat Aug  5 22:23:00 2006
+++ xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php	Sat Oct 14 23:17:49 2006
@@ -55,7 +55,7 @@
 			return USER_FRAME_VIEW_INPUT;
 		}
 
-		$root =& XCube_Root::getSingleton();		
+		$root =& XCube_Root::getSingleton();
 		if ($this->mMailjob->get('is_pm')) {
 			$this->mMailjob->mSend->add(array(&$this, "sendPM"));
 		}
@@ -98,7 +98,7 @@
 	 * Until private message will come to implement Service, we use pm object
 	 * directly.
 	 */
-	function sendPM(&$mailjob, &$to_user, &$from_user)
+	function sendPM(&$link, &$mailjob, &$to_user, &$from_user)
 	{
 		$handler =& xoops_gethandler('privmessage');
 		
@@ -109,10 +109,12 @@
 		$pm->set('from_userid', $from_user->get('uid'));
 		$pm->set('to_userid', $to_user->get('uid'));
 		
-		$handler->insert($pm);
+		if (!$handler->insert($pm)) {
+			$link->set('message', $link->get('message') . 'Cound not send PM.');
+		}
 	}
 
-	function sendMail(&$mailjob, $to_user, $from_user)
+	function sendMail(&$link, &$mailjob, $to_user, $from_user)
 	{
 		$xoopsMailer =& getMailer();
 		$xoopsMailer->useMail();
@@ -131,10 +133,9 @@
 		$xoopsMailer->setSubject($mailjob->getReplaceTitle($to_user, $from_user));
 		$xoopsMailer->setBody($mailjob->getReplaceBody($to_user, $from_user));
 
-		//
-		// TODO Error handling.
-		//		
-		$xoopsMailer->send(true);
+		if (!$xoopsMailer->send(true)) {
+			$link->set('message', $link->get('message') . $xoopsMailer->ErrorInfo);
+		}
 	}
 }
 


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index