Browse Source

[svn r21006] dokfs4255 : avoid mysql error when creating a group.

Noël Dieschburg 16 years ago
parent
commit
f901f0018a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/forum/forumfunction.inc.php

+ 1 - 1
main/forum/forumfunction.inc.php

@@ -539,7 +539,7 @@ function store_forum($values) {
 	if (is_null($values['forum_category'])) {
 		$new_max=null;
 	} else {
-		$sql="SELECT MAX(forum_order) as sort_max FROM ".$table_forums." WHERE forum_category=".Database::escape_string($values['forum_category']);
+		$sql="SELECT MAX(forum_order) as sort_max FROM ".$table_forums." WHERE forum_category='".Database::escape_string($values['forum_category'])."'";
 		$result=api_sql_query($sql,__FILE__,__LINE__);
 		$row=Database::fetch_array($result);
 		$new_max=$row['sort_max']+1;