diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-02-15 20:09:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-02-15 20:09:46 +0000 |
commit | 4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b (patch) | |
tree | cf369f7370c1be045e3d48e7a9beb26d1d0f3714 /modules/comment.module | |
parent | ae5136e51b87b414c737f4726c367c18db79fc49 (diff) | |
download | brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.gz brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.bz2 |
- Patch by Steven: removed redundant permission checks. These are no longer
required thanks to the new 404 handling.
Diffstat (limited to 'modules/comment.module')
-rw-r--r-- | modules/comment.module | 111 |
1 files changed, 53 insertions, 58 deletions
diff --git a/modules/comment.module b/modules/comment.module index 0f6b098d8..38c25fc45 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1181,65 +1181,60 @@ function comment_admin() { $op = arg(3); } - if (user_access("administer comments")) { - switch ($op) { - case "edit": - $output = comment_admin_edit(arg(3)); - break; - case "search": - $output = search_type("comment", url("admin/comment/search"), $_POST["keys"]); - break; - case "votes": - case t("Add new vote"): - case t("Delete vote"): - case t("Save vote"): - if (user_access("administer moderation")) { - $output = comment_mod_votes($edit); - } - break; - case "roles": - case t("Save scores"): - if (user_access("administer moderation")) { - $output = comment_mod_roles($edit); - } - break; - case "matrix": - case t("Submit votes"): - if (user_access("administer moderation")) { - $output = comment_mod_matrix($edit); - } - break; - case "filters": - case t("Add new threshold"): - case t("Delete threshold"): - case t("Save threshold"): - if (user_access("administer moderation")) { - $output = comment_mod_filters($edit); - } - break; - case "delete": - $output = comment_delete(arg(3), 0); - break; - case t("Delete comment"): - $output = comment_delete(arg(3), 1); - break; - case t("Submit"): - $output = comment_save(check_query(arg(3)), $edit); - $output .= comment_admin_overview(0); - break; - default: - if (arg(3) == 1) { - $output = comment_admin_overview(1); - } - else { - $output = comment_admin_overview(0); - } - } - print theme("page", $output); - } - else { - print theme("page", message_access()); + switch ($op) { + case "edit": + $output = comment_admin_edit(arg(3)); + break; + case "search": + $output = search_type("comment", url("admin/comment/search"), $_POST["keys"]); + break; + case "votes": + case t("Add new vote"): + case t("Delete vote"): + case t("Save vote"): + if (user_access("administer moderation")) { + $output = comment_mod_votes($edit); + } + break; + case "roles": + case t("Save scores"): + if (user_access("administer moderation")) { + $output = comment_mod_roles($edit); + } + break; + case "matrix": + case t("Submit votes"): + if (user_access("administer moderation")) { + $output = comment_mod_matrix($edit); + } + break; + case "filters": + case t("Add new threshold"): + case t("Delete threshold"): + case t("Save threshold"): + if (user_access("administer moderation")) { + $output = comment_mod_filters($edit); + } + break; + case "delete": + $output = comment_delete(arg(3), 0); + break; + case t("Delete comment"): + $output = comment_delete(arg(3), 1); + break; + case t("Submit"): + $output = comment_save(check_query(arg(3)), $edit); + $output .= comment_admin_overview(0); + break; + default: + if (arg(3) == 1) { + $output = comment_admin_overview(1); + } + else { + $output = comment_admin_overview(0); + } } + print theme("page", $output); } /* |