diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-03-29 20:05:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-03-29 20:05:07 +0000 |
commit | ec5aff0a0b8ea754a13ed5cbb58b67d40baad557 (patch) | |
tree | fd6b8f42fffe23dbecf3eacd4f9f5dfad6868f74 | |
parent | e73a163dbdbeace6e61e9c14e6ad9fc0041a8542 (diff) | |
download | brdo-ec5aff0a0b8ea754a13ed5cbb58b67d40baad557.tar.gz brdo-ec5aff0a0b8ea754a13ed5cbb58b67d40baad557.tar.bz2 |
- 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..
-rw-r--r-- | modules/comment.module | 10 | ||||
-rw-r--r-- | modules/comment/comment.module | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/modules/comment.module b/modules/comment.module index 50f9aaeec..d30c2a4ae 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -812,7 +812,7 @@ function comment_admin_overview($status = 0) { } function comment_mod_matrix($edit) { - global $tid, $rid; + global $rid; $output .= "<h3>Moderators/vote values matrix</h3>"; $output .= "<p><small><b>Note:</b> you must assign the <b>moderate comments</b> permission to at least one role in order to use this page.</small></p>"; @@ -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); 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 .= "<h3>Moderators/vote values matrix</h3>"; $output .= "<p><small><b>Note:</b> you must assign the <b>moderate comments</b> permission to at least one role in order to use this page.</small></p>"; @@ -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); |