summaryrefslogtreecommitdiff
path: root/modules/comment/comment.pages.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-01 20:39:20 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-01 20:39:20 +0000
commite9ca98b69d45b935fe4963a345cba92a87164ddb (patch)
tree44649b4db3ce1c4c8919255fb55f459c0f44c673 /modules/comment/comment.pages.inc
parentd9ab38b2d02037e0af3916b1d99120389e9aadd9 (diff)
downloadbrdo-e9ca98b69d45b935fe4963a345cba92a87164ddb.tar.gz
brdo-e9ca98b69d45b935fe4963a345cba92a87164ddb.tar.bz2
- Patch #504678 by catch: use objects instead of arrays.
Diffstat (limited to 'modules/comment/comment.pages.inc')
-rw-r--r--modules/comment/comment.pages.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc
index 9b4e3abcc..5748c4f46 100644
--- a/modules/comment/comment.pages.inc
+++ b/modules/comment/comment.pages.inc
@@ -125,13 +125,13 @@ function comment_reply($node, $pid = NULL) {
*/
function comment_approve($cid) {
// Load the comment whose cid = $cid
- if ($comment = (array) comment_load($cid)) {
- $comment['status'] = COMMENT_PUBLISHED;
- $comment['comment_format'] = $comment['format'];
+ if ($comment = comment_load($cid)) {
+ $comment->status = COMMENT_PUBLISHED;
+ $comment->comment_format = $comment->format;
comment_save($comment);
drupal_set_message(t('Comment approved.'));
- drupal_goto('node/' . $comment['nid']);
+ drupal_goto('node/' . $comment->nid);
}
else {
drupal_set_message(t('The comment you are approving does not exist.'), 'error');