Fixed a bug in which the parent post of a new post was not being stored in the DB.

svn path=/trunk/boinc/; revision=1835
This commit is contained in:
David Anderson 2003-07-28 22:47:48 +00:00
parent 3946cea13c
commit 3f10b6e8f5
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ class Thread {
return $thread->id;
}
function reply($user = -1, $content = "", $parent_post = NULL) {
function reply($user = -1, $content = "", $parent_post=NULL) {
$content = addslashes(htmlentities($content));
$post = new Post();
@ -165,7 +165,7 @@ class Post {
}
function insert() {
$sql = "INSERT INTO post (thread, user, timestamp, content) VALUES (".$this->thread.", ".$this->user.", UNIX_TIMESTAMP(), '".$this->content."')";
$sql = "INSERT INTO post (thread, user, timestamp, content, parent_post) VALUES (".$this->thread.", ".$this->user.", UNIX_TIMESTAMP(), '".$this->content."', ".$this->parent_post.")";
$result = sql_query($sql);
if (!$result)
return false;