diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-11-20 20:59:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-11-20 20:59:54 +0000 |
commit | d259cc19730df7cfda7dcbfa20294669f4250568 (patch) | |
tree | c3967fe722e4a039eb61c3d656c76788448da2d8 | |
parent | 56d72a918f29a2e1c017c84519d1d6a67f9e9613 (diff) | |
download | brdo-d259cc19730df7cfda7dcbfa20294669f4250568.tar.gz brdo-d259cc19730df7cfda7dcbfa20294669f4250568.tar.bz2 |
- Commited Moshe's comment moderation improvements.
-rw-r--r-- | modules/comment.module | 8 | ||||
-rw-r--r-- | modules/comment/comment.module | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/comment.module b/modules/comment.module index 8c1c7b57f..c4ad80200 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -301,7 +301,7 @@ function comment_links($comment, $return = 1) { global $user, $theme; $links = array(); - + /* ** If we are viewing just this comment, we link back to the node */ @@ -314,7 +314,7 @@ function comment_links($comment, $return = 1) { ** Admin link */ - if (user_access("administer comments")) { + if (user_access("administer comments") && user_access("access administration pages")) { $links[] = la(t("administer"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)); // $links[] = lm(t("unpublish"), array ("mod" => "comment", "op" => "Moderate comment", "moderation[$comment->cid]" => "offline", "edit[nid]" => $comment->nid), "", array ("title" => t("hide this comment by marking it non-published"))); } @@ -414,7 +414,7 @@ function comment_render($node, $cid = 0) { comment_view($comment, comment_links($comment)); } - if ((user_access("administer comments") || comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { + if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { print "<div align=\"center\">". form_submit(t("Moderate comment")) ."</div><br />"; } print "</form>"; @@ -1154,7 +1154,7 @@ function comment_moderation_form($comment) { // preview comment: $output .= " "; } - else if ((user_access("administer comments") || comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { + else if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { // comment hasn't been moderated yet: if (!isset($votes)) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 8c1c7b57f..c4ad80200 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -301,7 +301,7 @@ function comment_links($comment, $return = 1) { global $user, $theme; $links = array(); - + /* ** If we are viewing just this comment, we link back to the node */ @@ -314,7 +314,7 @@ function comment_links($comment, $return = 1) { ** Admin link */ - if (user_access("administer comments")) { + if (user_access("administer comments") && user_access("access administration pages")) { $links[] = la(t("administer"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)); // $links[] = lm(t("unpublish"), array ("mod" => "comment", "op" => "Moderate comment", "moderation[$comment->cid]" => "offline", "edit[nid]" => $comment->nid), "", array ("title" => t("hide this comment by marking it non-published"))); } @@ -414,7 +414,7 @@ function comment_render($node, $cid = 0) { comment_view($comment, comment_links($comment)); } - if ((user_access("administer comments") || comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { + if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { print "<div align=\"center\">". form_submit(t("Moderate comment")) ."</div><br />"; } print "</form>"; @@ -1154,7 +1154,7 @@ function comment_moderation_form($comment) { // preview comment: $output .= " "; } - else if ((user_access("administer comments") || comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { + else if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { // comment hasn't been moderated yet: if (!isset($votes)) { |