[Fusionforge-commits] r8605 - in branches/Branch_4_8/gforge/common: forum include

Alexandre Neymann neymanna at libremir.placard.fr.eu.org
Mon Dec 21 17:22:30 CET 2009


Author: neymanna
Date: 2009-12-21 17:22:30 +0100 (Mon, 21 Dec 2009)
New Revision: 8605

Modified:
   branches/Branch_4_8/gforge/common/forum/Forum.class.php
   branches/Branch_4_8/gforge/common/include/Group.class.php
Log:
fix check of forum name

Modified: branches/Branch_4_8/gforge/common/forum/Forum.class.php
===================================================================
--- branches/Branch_4_8/gforge/common/forum/Forum.class.php	2009-12-21 16:19:39 UTC (rev 8604)
+++ branches/Branch_4_8/gforge/common/forum/Forum.class.php	2009-12-21 16:22:30 UTC (rev 8605)
@@ -125,6 +125,7 @@
 			$this->setError(_('Forum Description Must Be At Least 10 Characters'));
 			return false;
 		}
+		$forum_name = strtolower($forum_name);
 		if (!preg_match('/^([_\.0-9a-z-])*$/i',$forum_name)) {
 			$this->setError(_('Illegal Characters in Forum Name'));
 			return false;
@@ -170,7 +171,7 @@
 		db_begin();
 		$result = db_query_params('INSERT INTO forum_group_list (group_id,forum_name,is_public,description,send_all_posts_to,allow_anonymous,moderation_level) VALUES ($1,$2,$3,$4,$5,$6,$7)',
 					  array ($this->Group->getID(),
-						 strtolower($forum_name),
+						 $forum_name,
 						 $is_public,
 						 htmlspecialchars($description),
 						 $send_all_posts_to,
@@ -592,6 +593,7 @@
 			$this->setError(_('Forum Description Must Be At Least 10 Characters'));
 			return false;
 		}
+		$forum_name = strtolower($forum_name);
 		if (!preg_match('/^([_\.0-9a-z-])*$/',$forum_name)) {
 			$this->setError(_('Illegal Characters in Forum Name'));
 			return false;
@@ -618,7 +620,7 @@
 			is_public=$6
 			WHERE group_id=$7
 			AND group_forum_id=$8',
-					array (strtolower($forum_name),
+					array ($forum_name,
 					       htmlspecialchars($description),
 					       $send_all_posts_to,
 					       $allow_anonymous,

Modified: branches/Branch_4_8/gforge/common/include/Group.class.php
===================================================================
--- branches/Branch_4_8/gforge/common/include/Group.class.php	2009-12-21 16:19:39 UTC (rev 8604)
+++ branches/Branch_4_8/gforge/common/include/Group.class.php	2009-12-21 16:22:30 UTC (rev 8605)
@@ -2055,7 +2055,7 @@
 			return false;
 		}
 		$f = new Forum($this);
-		if (!$f->create(_('Developers'),_('Project Developer Discussion'),0,'',1,0)) {
+		if (!$f->create(_('Developers-Discussion'),_('Project Developer Discussion'),0,'',1,0)) {
 			$this->setError(sprintf (_('F%d: %s'), 3, $f->getErrorMessage()));
 			db_rollback();
 			setup_gettext_from_context();




More information about the Fusionforge-commits mailing list