summaryrefslogtreecommitdiff
path: root/includes/node.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/node.inc')
-rw-r--r--includes/node.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/node.inc b/includes/node.inc
index 462fc7a47..75b1fdc8c 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -52,7 +52,7 @@ function node_save($node) {
if ($u1 = implode(", ", $u1)) db_query("UPDATE node SET $u1 WHERE nid = '$node[nid]'");
if ($u2 = implode(", ", $u2)) db_query("UPDATE $n->type SET $u2 WHERE nid = '$node[nid]'");
- if ($n->pid && ($node[status] == $status[posted])) db_query("UPDATE node SET status = '$status[expired]' WHERE nid = '$node[pid]'");
+ if ($n->pid && ($node[status] == $status[posted])) db_query("UPDATE node SET status = '$status[expired]' WHERE nid = '$n->pid'");
watchdog("message", "node: modified '$n->title'");
}
@@ -63,6 +63,8 @@ function node_save($node) {
watchdog("warning", "node: duplicate '$node[title]'");
}
else {
+ throttle("post node", variable_get(max_node_rate, 900));
+
// setup default values:
$node = array_merge(array(title => "?", author => $user->id, type => "?", pid => 0, log => "node created", status => $status[queued], score => 0, votes => 0, timestamp => time()), $node);