[Fusionforge-commits] r10439 - in trunk/src/common: forum mail

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Sep 9 21:06:01 CEST 2010


Author: aljeux
Date: 2010-09-09 21:06:00 +0200 (Thu, 09 Sep 2010)
New Revision: 10439

Modified:
   trunk/src/common/forum/ForumMessage.class.php
   trunk/src/common/mail/MailingList.class.php
Log:
db_rollback() after message.

Modified: trunk/src/common/forum/ForumMessage.class.php
===================================================================
--- trunk/src/common/forum/ForumMessage.class.php	2010-09-09 19:05:51 UTC (rev 10438)
+++ trunk/src/common/forum/ForumMessage.class.php	2010-09-09 19:06:00 UTC (rev 10439)
@@ -218,13 +218,13 @@
 		} else {
 			$msg_id=db_insertid($result,'forum','msg_id');
 			if (!$this->fetchData($msg_id)) {
+				$this->setError(_('ForumMessage::create() Posting Failed').' '.db_error());
 				db_rollback();
-				$this->setError(_('ForumMessage::create() Posting Failed').' '.db_error());
 				return false;
 			}
 			if (!$msg_id) {
+				$this->setError(_('ForumMessage::create() Unable to get new message id'));
 				db_rollback();
-				$this->setError(_('ForumMessage::create() Unable to get new message id'));
 				return false;
 			} else {
 				if (!$this->sendNotice()) {

Modified: trunk/src/common/mail/MailingList.class.php
===================================================================
--- trunk/src/common/mail/MailingList.class.php	2010-09-09 19:05:51 UTC (rev 10438)
+++ trunk/src/common/mail/MailingList.class.php	2010-09-09 19:06:00 UTC (rev 10439)
@@ -172,8 +172,8 @@
 		$user = &user_get_object($creator_id);
 		$userEmail = $user->getEmail();
 		if(empty($userEmail) || !validate_email($userEmail)) {
+			$this->setInvalidEmailError();
 			db_rollback();
-			$this->setInvalidEmailError($userEmail);
 			return false;
 		} else {
 			$mailBody = sprintf(_('A mailing list will be created on %1$s in 6-24 hours 




More information about the Fusionforge-commits mailing list