summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-06-03 16:30:20 +0000
committerDries Buytaert <dries@buytaert.net>2008-06-03 16:30:20 +0000
commit3f052180dc7a6576e9976b23e397528ccb4899d3 (patch)
treeb8edeaa1f2f4a309455a713fa605875da0229eea /modules/comment/comment.module
parentcccf98aaa09e556efcd075534da73774ac144bc0 (diff)
downloadbrdo-3f052180dc7a6576e9976b23e397528ccb4899d3.tar.gz
brdo-3f052180dc7a6576e9976b23e397528ccb4899d3.tar.bz2
- Patch #66264 by boombatower: comment approval displayed on node view of comment. Comes with tests and everything.
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)) {