Commit 61640746 authored by Dries's avatar Dries

- Patch #38999 by saerdna: There's no need that users with the "administer...

- Patch #38999 by saerdna: There's no need that users with the "administer comments" role has to go via admin/comments to delete comments. this patch simply adds the delete link on each comment if you have administer comments role.  "access administration pages" not needed; because if they not have it they can still delete from admin/comments.
parent f8b5f21c
......@@ -767,7 +767,7 @@ function comment_links($comment, $return = 1) {
}
if (node_comment_mode($comment->nid) == COMMENT_NODE_READ_WRITE) {
if (user_access('administer comments') && user_access('access administration pages')) {
if (user_access('administer comments') && user_access('post comments')) {
$links[] = l(t('delete'), "comment/delete/$comment->cid");
$links[] = l(t('edit'), "comment/edit/$comment->cid");
$links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
......
......@@ -767,7 +767,7 @@ function comment_links($comment, $return = 1) {
}
if (node_comment_mode($comment->nid) == COMMENT_NODE_READ_WRITE) {
if (user_access('administer comments') && user_access('access administration pages')) {
if (user_access('administer comments') && user_access('post comments')) {
$links[] = l(t('delete'), "comment/delete/$comment->cid");
$links[] = l(t('edit'), "comment/edit/$comment->cid");
$links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment