summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-05-15 21:35:27 +0000
committerDries Buytaert <dries@buytaert.net>2001-05-15 21:35:27 +0000
commit1022eb61ab984862167bfa584ab4044ee2410d5b (patch)
tree21218861058c21c99efdba836e744bc12c8f153b
parenta669485bc4a7d81a6b5d4c40c6eaea746db8b669 (diff)
downloadbrdo-1022eb61ab984862167bfa584ab4044ee2410d5b.tar.gz
brdo-1022eb61ab984862167bfa584ab4044ee2410d5b.tar.bz2
- Drastically simplified the node_save() API, which should make the
node-forms more secure. Updated "node.module" and "queue.module" to work with the new API. The upgrade script, 2.00-to-x.xx.php, is still broken and needs fixing.
-rw-r--r--modules/node.module2
-rw-r--r--modules/node/node.module2
-rw-r--r--modules/queue.module6
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/node.module b/modules/node.module
index 8b31f63c5..e469bbfea 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -101,7 +101,7 @@ function node_admin() {
print node_listing(node_query());
break;
case "Save node":
- node_save($edit);
+ node_save($edit, array(uthor, comment, moderate, promote, status, timestamp));
print node_admin_view($id);
break;
case "View node":
diff --git a/modules/node/node.module b/modules/node/node.module
index 8b31f63c5..e469bbfea 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -101,7 +101,7 @@ function node_admin() {
print node_listing(node_query());
break;
case "Save node":
- node_save($edit);
+ node_save($edit, array(uthor, comment, moderate, promote, status, timestamp));
print node_admin_view($id);
break;
case "View node":
diff --git a/modules/queue.module b/modules/queue.module
index 9b0bcfcb9..63278a0af 100644
--- a/modules/queue.module
+++ b/modules/queue.module
@@ -27,15 +27,15 @@ function queue_vote($id, $vote) {
if ($node = node_get_object(nid, $id)) {
if (variable_get("post_threshold", 4, $node) <= $node->score) {
- node_save(array(nid => $id, status => $status[posted]));
+ node_save(array(nid => $id, status => $status[posted]), array(status));
watchdog("message", "node: posted '$node->title' - moderation");
}
else if (variable_get("dump_threshold", -2, $node) >= $node->score) {
- node_save(array(nid => $id, status => $status[dumped]));
+ node_save(array(nid => $id, status => $status[dumped]), array(status));
watchdog("message", "node: dumped '$node->title' - moderation");
}
else if (variable_get("expire_threshold", 8, $node) <= $node->votes) {
- node_save(array(nid => $id, status => $status[expired]));
+ node_save(array(nid => $id, status => $status[expired]), array(status));
watchdog("message", "node: expired '$node->title' - moderation");
}
}