From f104d3cc12134fc574373d6a643d9c84a317de44 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 26 Sep 2003 10:04:09 +0000 Subject: - Committed the admin menu integration patch. Thanks Adrian, Stefan and others. --- modules/comment.module | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index 43060e2a0..5e40378a7 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -813,23 +813,25 @@ function comment_link($type, $node = 0, $main = 0) { } } - if ($type == "admin" && user_access("administer comments")) { - - menu("admin/comment", "comment management", "comment_admin", comment_help("admin/comment"), 2); - menu("admin/comment/comments", "comment overview",NULL, comment_help("admin/comment/comments"), 2); - menu("admin/comment/comments/0", "new or updated comments", "comment_admin", comment_help("admin/comment/comments/0"), 1); - menu("admin/comment/comments/1", "comment approval queue", "comment_admin", comment_help("admin/comment/comments/1"), 2); - menu("admin/comment/search", "search comments", "comment_admin", comment_help("admin/comment/search"), 8); - menu("admin/comment/help", "help", "comment_help", NULL, 9); - menu("admin/comment/edit", "edit comment", "comment_admin", NULL, 0, 1); - - // comment settings: - if (user_access("administer moderation")) { - menu("admin/comment/moderation", "comment moderation", NULL, comment_help("admin/comment/moderation"), 3); - menu("admin/comment/moderation/votes", "votes", "comment_admin", comment_help("admin/comment/moderation/votes")); - menu("admin/comment/moderation/matrix", "matrix", "comment_admin", comment_help("admin/comment/moderation/matrix")); - menu("admin/comment/moderation/filters", "thresholds", "comment_admin", comment_help("admin/comment/moderation/filters")); - menu("admin/comment/moderation/roles", "initial comment scores", "comment_admin", comment_help("admin/comment/roles"), 6); + if ($type == "system") { + if (user_access("administer comments")) { + + menu("admin/comment", "comment management", "comment_admin", comment_help("admin/comment"), 2); + menu("admin/comment/comments", "comment overview",NULL, comment_help("admin/comment/comments"), 2); + menu("admin/comment/comments/0", "new or updated comments", "comment_admin", comment_help("admin/comment/comments/0"), 1); + menu("admin/comment/comments/1", "comment approval queue", "comment_admin", comment_help("admin/comment/comments/1"), 2); + menu("admin/comment/search", "search comments", "comment_admin", comment_help("admin/comment/search"), 8); + menu("admin/comment/help", "help", "comment_help", NULL, 9); + menu("admin/comment/edit", "edit comment", "comment_admin", NULL, 0, 1); + + // comment settings: + if (user_access("administer moderation")) { + menu("admin/comment/moderation", "comment moderation", NULL, comment_help("admin/comment/moderation"), 3); + menu("admin/comment/moderation/votes", "votes", "comment_admin", comment_help("admin/comment/moderation/votes")); + menu("admin/comment/moderation/matrix", "matrix", "comment_admin", comment_help("admin/comment/moderation/matrix")); + menu("admin/comment/moderation/filters", "thresholds", "comment_admin", comment_help("admin/comment/moderation/filters")); + menu("admin/comment/moderation/roles", "initial comment scores", "comment_admin", comment_help("admin/comment/roles"), 6); + } } } -- cgit v1.2.3