summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 80c69f9a9..6dc45017f 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -212,6 +212,13 @@ function comment_menu() {
'access arguments' => array('view', 2),
'type' => MENU_CALLBACK,
);
+ $items['comment/approve'] = array(
+ 'title' => 'Approve to comment',
+ 'page callback' => 'comment_approve',
+ 'page arguments' => array(2),
+ 'access arguments' => array('administer comments'),
+ 'type' => MENU_CALLBACK,
+ );
return $items;
}
@@ -808,6 +815,12 @@ function comment_links($comment, $return = 1) {
'title' => t('reply'),
'href' => "comment/reply/$comment->nid/$comment->cid"
);
+ if ($comment->status == COMMENT_NOT_PUBLISHED) {
+ $links['comment_approve'] = array(
+ 'title' => t('approve'),
+ 'href' => "comment/approve/$comment->cid"
+ );
+ }
}
elseif (user_access('post comments')) {
if (comment_access('edit', $comment)) {