Projet

Général

Profil

Révision 560c3060

Ajouté par Julien Enselme il y a plus de 8 ans

Update ctools 1.7 -> 1.9

Voir les différences:

drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_comment_form.inc
77 77
  }
78 78
}
79 79

  
80
/**
81
 * Alter the comment form to get a little more control over it.
82
 */
83
function ctools_form_comment_form_alter(&$form, &$form_state) {
84
  if (!empty($form_state['ctools comment alter'])) {
85
    // Force the form to post back to wherever we are.
86
    $form['#action'] = url($_GET['q'], array('fragment' => 'comment-form'));
87
    if (empty($form['#submit'])) {
88
      $form['#submit'] = array('comment_form_submit');
89
    }
90
    $form['#submit'][] = 'ctools_node_comment_form_submit';
91
  }
92
}
93

  
94
function ctools_node_comment_form_submit(&$form, &$form_state) {
95
  $form_state['redirect'][0] = $_GET['q'];
96
}

Formats disponibles : Unified diff