Projet

Général

Profil

Révision c12e7e6a

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

htmltest/sites/all/modules/variable/variable.form.inc
154 154
}
155 155

  
156 156
/**
157
 * Implement validate callback
157
 * Execute submit callbacks for variables in form.
158 158
 */
159
function variable_form_element_validate($element, &$form_state, $form) {
160
  $variable = $element['#variable'];
161
  variable_include($variable);
162
  $variable['value'] = isset($element['#value']) ? $element['#value'] : NULL;
163
  if ($error = call_user_func($variable['validate callback'], $variable)) {
164
    form_error($element, $error);
159
function variable_form_submit_callback($form, &$form_state) {
160
  if (isset($form['#variable_edit_form'])) {
161
    // This may contain some realm options.
162
    $options = isset($form['#variable_options']) ? $form['#variable_options'] : array();
163
    foreach ($form['#variable_edit_form'] as $name) {
164
      $variable = variable_get_info($name);
165
      if ($variable && isset($variable['submit callback'])) {
166
        variable_include($variable);
167
        $variable['submit callback']($variable, $options, $form, $form_state);
168
      }
169
    }
165 170
  }
166 171
}
167 172

  

Formats disponibles : Unified diff