Commit 56b35360 authored by Dries's avatar Dries

- Fixed problem with book.module (reported by Jared).

- Fixed problem with forum.module (reported by Jared).
parent 168db4c9
......@@ -168,13 +168,13 @@ function book_delete($node) {
function book_insert($node) {
if ($node->pid && $node->status == node_status("posted")) {
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'", 1);
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'");
}
}
function book_update($node) {
if ($node->pid && $node->status == node_status("posted")) {
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'", 1);
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'");
}
}
......
......@@ -168,13 +168,13 @@ function book_delete($node) {
function book_insert($node) {
if ($node->pid && $node->status == node_status("posted")) {
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'", 1);
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'");
}
}
function book_update($node) {
if ($node->pid && $node->status == node_status("posted")) {
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'", 1);
db_query("UPDATE node SET status = '". node_status("expired") ."' WHERE nid = '$node->pid'");
}
}
......
......@@ -24,7 +24,7 @@ function forum_form($edit = array()) {
function forum_save($edit) {
global $user, $status;
node_save($edit, array(author => $user->id, body, comment => 1, moderate => variable_get("forum_moderate", ""), promote => variable_get("forum_promote", 0), score => 0, status => $status[posted], timestamp => time(), title, type => "forum", votes => 0));
node_save($edit, array(author => $user->id, body, comment => 1, moderate => 0, promote => 0, score => 0, status => $status[posted], timestamp => time(), title, type => "forum", votes => 0));
}
function forum_num_comments($nid) {
......
......@@ -24,7 +24,7 @@ function forum_form($edit = array()) {
function forum_save($edit) {
global $user, $status;
node_save($edit, array(author => $user->id, body, comment => 1, moderate => variable_get("forum_moderate", ""), promote => variable_get("forum_promote", 0), score => 0, status => $status[posted], timestamp => time(), title, type => "forum", votes => 0));
node_save($edit, array(author => $user->id, body, comment => 1, moderate => 0, promote => 0, score => 0, status => $status[posted], timestamp => time(), title, type => "forum", votes => 0));
}
function forum_num_comments($nid) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment