From 048664f2786fce9bd049f39eea39a2a7fe2868f0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 5 Apr 2001 20:33:36 +0000 Subject: - a bunch of various updates --- modules/moderation.module | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'modules/moderation.module') diff --git a/modules/moderation.module b/modules/moderation.module index b322f2ed4..9f7a7049f 100644 --- a/modules/moderation.module +++ b/modules/moderation.module @@ -1,11 +1,18 @@ "+ 0", + "post it (+1)" => "+ 1", + "dump it (-1)" => "- 1"); + $module = array("menu" => "moderation_menu", "page" => "moderation_page"); -include_once "includes/common.inc"; -include_once "includes/node.inc"; - function moderation_menu() { return array("". t("moderation queue") ." (". moderation_count() .")"); } @@ -32,15 +39,15 @@ function moderation_vote($id, $vote) { $user = user_set($user, "history", "n$id", $vote); if ($node = node_get_object(nid, $id)) { - if (node_post_threshold($node) <= $node->score) { + if (variable_get("post_threshold", 4, $node) <= $node->score) { node_save(array(nid => $id, status => $status[posted])); watchdog("message", "node: posted '$node->title' - moderation"); } - else if (node_dump_threshold($node) >= $node->score) { + else if (variable_get("dump_threshold", -2, $node) >= $node->score) { node_save(array(nid => $id, status => $status[dumped])); watchdog("message", "node: dumped '$node->title' - moderation"); } - else if (node_timout_threshold($node) <= $node->votes) { + else if (variable_get("timout_threshold", 8, $node) <= $node->votes) { node_save(array(nid => $id, status => $status[expired])); watchdog("message", "node: expired '$node->title' - moderation"); } -- cgit v1.2.3