summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-18 00:12:48 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-18 00:12:48 +0000
commitdf02fa3ca46e16974192de77580762188ad47f49 (patch)
tree91b2354aae786d7b187028dbc61fb3893b04ae64 /modules/comment
parente18feedfdb429e35173b85fc7182aadabee0a166 (diff)
downloadbrdo-df02fa3ca46e16974192de77580762188ad47f49.tar.gz
brdo-df02fa3ca46e16974192de77580762188ad47f49.tar.bz2
#571086 by sun and merlinofchaos: Added a 'wrapper callback' that executes
before a form builder function, to facilitate common form elements. Clean-up from form_builder changes from CTools patch. Has nice side-benefit of making all form functions' signatures consistent.
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.admin.inc7
-rw-r--r--modules/comment/comment.module3
2 files changed, 4 insertions, 6 deletions
diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc
index fcb1adf7a..2cd5966e4 100644
--- a/modules/comment/comment.admin.inc
+++ b/modules/comment/comment.admin.inc
@@ -34,7 +34,7 @@ function comment_admin($type = 'new') {
* @see comment_admin_overview_submit()
* @see theme_comment_admin_overview()
*/
-function comment_admin_overview($type = 'new', $arg) {
+function comment_admin_overview($form, &$form_state, $arg) {
// Build an 'Update options' form.
$form['options'] = array(
'#type' => 'fieldset',
@@ -159,7 +159,7 @@ function comment_admin_overview_submit($form, &$form_state) {
* @ingroup forms
* @see comment_multiple_delete_confirm_submit()
*/
-function comment_multiple_delete_confirm(&$form_state) {
+function comment_multiple_delete_confirm($form, &$form_state) {
$edit = $form_state['input'];
$form['comments'] = array(
@@ -232,8 +232,7 @@ function comment_delete_page($cid = NULL) {
* @ingroup forms
* @see comment_confirm_delete_submit()
*/
-function comment_confirm_delete(&$form_state, $comment) {
- $form = array();
+function comment_confirm_delete($form, &$form_state, $comment) {
$form['#comment'] = $comment;
return confirm_form(
$form,
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index e02f964f4..690c5db03 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1616,7 +1616,7 @@ function comment_get_display_page($cid, $node_type) {
* @see comment_form_validate()
* @see comment_form_submit()
*/
-function comment_form(&$form_state, $comment) {
+function comment_form($form, &$form_state, $comment) {
global $user;
$op = isset($_POST['op']) ? $_POST['op'] : '';
@@ -1634,7 +1634,6 @@ function comment_form(&$form_state, $comment) {
$comment += array('name' => '', 'mail' => '', 'homepage' => '');
$comment = (object) $comment;
- $form = array();
if (isset($form_state['comment_preview'])) {
$form += $form_state['comment_preview'];
}