summaryrefslogtreecommitdiff
path: root/modules/comment/comment.pages.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-01 05:58:18 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-01 05:58:18 +0000
commit59f89d62b5c6e3e84f7ecb9c9293b99aeed01f47 (patch)
tree71f9dace5628428de88913cc813a4c3ea0c67416 /modules/comment/comment.pages.inc
parent7dd203c42402be2174042c1ad56eb73f7a908eb6 (diff)
downloadbrdo-59f89d62b5c6e3e84f7ecb9c9293b99aeed01f47.tar.gz
brdo-59f89d62b5c6e3e84f7ecb9c9293b99aeed01f47.tar.bz2
- Patch #537062 by yched: remove unneeded comment_edit() page callback and convert some code from arrays to objects for consistency.
Diffstat (limited to 'modules/comment/comment.pages.inc')
-rw-r--r--modules/comment/comment.pages.inc15
1 files changed, 2 insertions, 13 deletions
diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc
index e575460cf..0853bcb3b 100644
--- a/modules/comment/comment.pages.inc
+++ b/modules/comment/comment.pages.inc
@@ -7,17 +7,6 @@
*/
/**
- * A menu callback; build a comment editing form.
- *
- * @param $comment
- * The comment to be edited.
- * @ingroup forms
- */
-function comment_edit($comment) {
- return drupal_get_form('comment_form', (array)$comment);
-}
-
-/**
* This function is responsible for generating a comment reply form.
* There are several cases that have to be handled, including:
* - replies to comments
@@ -48,7 +37,7 @@ function comment_reply($node, $pid = NULL) {
// The user is previewing a comment prior to submitting it.
if ($op == t('Preview')) {
if (user_access('post comments')) {
- $build['comment_form'] = drupal_get_form('comment_form', array('pid' => $pid, 'nid' => $node->nid));
+ $build['comment_form'] = drupal_get_form('comment_form', (object) array('pid' => $pid, 'nid' => $node->nid));
}
else {
drupal_set_message(t('You are not authorized to post comments.'), 'error');
@@ -95,7 +84,7 @@ function comment_reply($node, $pid = NULL) {
}
elseif (user_access('post comments')) {
$edit = array('nid' => $node->nid, 'pid' => $pid);
- $build['comment_form'] = drupal_get_form('comment_form', $edit);
+ $build['comment_form'] = drupal_get_form('comment_form', (object) $edit);
}
else {
drupal_set_message(t('You are not authorized to post comments.'), 'error');