[Fusionforge-commits] r17209 - in branches/Branch_5_1: . src/common/include

Roland Mas lolando at fusionforge.org
Wed Apr 17 11:54:52 CEST 2013


Author: lolando
Date: 2013-04-17 11:54:52 +0200 (Wed, 17 Apr 2013)
New Revision: 17209

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/common/include/utils.php
Log:
Fixed error where you couldn't create a mailing-list if forums weren't enabled

Modified: branches/Branch_5_1/src/common/include/utils.php
===================================================================
--- branches/Branch_5_1/src/common/include/utils.php	2013-04-17 09:53:15 UTC (rev 17208)
+++ branches/Branch_5_1/src/common/include/utils.php	2013-04-17 09:54:52 UTC (rev 17209)
@@ -1228,6 +1228,7 @@
 
 function check_email_available($group, $email, &$response) {
 	// Check if a mailing list with same name already exists
+	if ($group->usesMail()) {
 	$mlFactory = new MailingListFactory($group);
 	if (!$mlFactory || !is_object($mlFactory) || $mlFactory->isError()) {
 		$response .= $mlFactory->getErrorMessage();
@@ -1245,8 +1246,10 @@
 			return false;
 		}
 	}
+	}
 
 	// Check if a forum with same name already exists
+	if ($group->usesForum()) {
 	$ff = new ForumFactory($group);
 	if (!$ff || !is_object($ff) || $ff->isError()) {
 		$response .= $ff->getErrorMessage();
@@ -1262,6 +1265,7 @@
 			}
 		}
 	}
+	}
 
 	// Email is available
 	return true;




More information about the Fusionforge-commits mailing list