From ec5aff0a0b8ea754a13ed5cbb58b67d40baad557 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 29 Mar 2003 20:05:07 +0000 Subject: - Fixed a bug in the "comment votes" _and_ "comment filters" page. Reported by Paul C. TODO: someone should look into 'comment_mod_matrix()' - it uses a global variable $rid that is not set anywhere.. --- modules/comment/comment.module | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 50f9aaeec..d30c2a4ae 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -812,7 +812,7 @@ function comment_admin_overview($status = 0) { } function comment_mod_matrix($edit) { - global $tid, $rid; + global $rid; $output .= "

Moderators/vote values matrix

"; $output .= "

Note: you must assign the moderate comments permission to at least one role in order to use this page.

"; @@ -884,7 +884,9 @@ function comment_mod_roles($edit) { } function comment_mod_votes($edit) { - global $op, $mid, $tid; + global $op; + + $mid = arg(3); if ($op == t("Save vote")) { db_query("UPDATE moderation_votes SET vote = '%s', weight = '%d' WHERE mid = '%d'", $edit["vote"], $edit["weight"], $mid); @@ -931,7 +933,9 @@ function comment_mod_votes($edit) { } function comment_mod_filters($edit) { - global $op, $fid, $tid; + global $op; + + $fid = arg(3); if ($op == t("Save threshold")) { db_query("UPDATE moderation_filters SET filter = '%s', minimum = '%d' WHERE fid = '%d'", $edit["filter"], $edit["minimum"], $fid); -- cgit v1.2.3