*** empty log message ***

svn path=/trunk/boinc/; revision=5044
This commit is contained in:
David Anderson 2005-01-09 09:33:06 +00:00
parent f7cf628e1a
commit 3726e76ba6
3 changed files with 42 additions and 42 deletions

View File

@ -22434,6 +22434,8 @@ David 9 Jan 2005
David 9 Jan 2005
- user profile fixes
- disallow thread titles consisting only of HTML tags
html/inc/
forum.inc
profile.inc

View File

@ -332,7 +332,7 @@ function createThread($forumID, $ownerID, $title, $content, $add_signature=false
$content = addslashes(sanitize_html(stripslashes($content)));
$title = trim($title);
if (strlen($title) == 0) {
if (strlen(strip_tags($title)) == 0) {
return 0;
}
@ -341,7 +341,7 @@ function createThread($forumID, $ownerID, $title, $content, $add_signature=false
if (!$result) return false;
$threadID = mysql_insert_id();
$postID = addPost($threadID, $ownerID, NULL, $content, $add_signature);
addPost($threadID, $ownerID, NULL, $content, $add_signature);
$sql = "UPDATE forum_preferences SET posts = posts + 1 WHERE userid = " . $ownerID . " LIMIT 1";
mysql_query($sql);
@ -378,8 +378,6 @@ function addPost($threadID, $userID, $parentID, $content, $add_signature=false)
}
$result = mysql_query($sql);
if (!$result) return false;
//return ($post->id = mysql_insert_id());
mysql_insert_id();
return true;
}