diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-16 20:40:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-16 20:40:05 +0000 |
commit | 53aa4c6c6adff310c0afc8c3a09da93bb9438bb0 (patch) | |
tree | 0be7e694db1344f5e204dd1774cbbd0a4365c418 /modules/comment/comment.pages.inc | |
parent | 045074d4c51025a7c1561a9bf2e2a8b05441b23d (diff) | |
download | brdo-53aa4c6c6adff310c0afc8c3a09da93bb9438bb0.tar.gz brdo-53aa4c6c6adff310c0afc8c3a09da93bb9438bb0.tar.bz2 |
- Patch #606608 by q0rban, sun, David_Rothstein: use proper menu router paths for comment/*.
Diffstat (limited to 'modules/comment/comment.pages.inc')
-rw-r--r-- | modules/comment/comment.pages.inc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc index b428a7f6b..72b490497 100644 --- a/modules/comment/comment.pages.inc +++ b/modules/comment/comment.pages.inc @@ -103,20 +103,14 @@ function comment_reply($node, $pid = NULL) { /** * Menu callback; publish specified comment. * - * @param $cid ID of comment to be published. + * @param $comment + * A comment object. */ -function comment_approve($cid) { - // Load the comment whose cid = $cid - if ($comment = comment_load($cid)) { - $comment->status = COMMENT_PUBLISHED; - $comment->comment_format = $comment->format; - comment_save($comment); +function comment_approve($comment) { + $comment->status = COMMENT_PUBLISHED; + $comment->comment_format = $comment->format; + comment_save($comment); - drupal_set_message(t('Comment approved.')); - drupal_goto('node/' . $comment->nid); - } - else { - drupal_set_message(t('The comment you are approving does not exist.'), 'error'); - drupal_goto(); - } + drupal_set_message(t('Comment approved.')); + drupal_goto('node/' . $comment->nid); } |