Projet

Général

Profil

Révision 01a79e9a

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

Update to drupal 7.26

Voir les différences:

htmltest/includes/form.inc
235 235
 *     likely to occur during Ajax operations.
236 236
 *   - programmed: If TRUE, the form was submitted programmatically, usually
237 237
 *     invoked via drupal_form_submit(). Defaults to FALSE.
238
 *   - programmed_bypass_access_check: If TRUE, programmatic form submissions
239
 *     are processed without taking #access into account. Set this to FALSE
240
 *     when submitting a form programmatically with values that may have been
241
 *     input by the user executing the current request; this will cause #access
242
 *     to be respected as it would on a normal form submission. Defaults to
243
 *     TRUE.
238 244
 *   - process_input: Boolean flag. TRUE signifies correct form submission.
239 245
 *     This is always TRUE for programmed forms coming from drupal_form_submit()
240 246
 *     (see 'programmed' key), or if the form_id coming from the $_POST data is
......
402 408
    'submitted' => FALSE,
403 409
    'executed' => FALSE,
404 410
    'programmed' => FALSE,
411
    'programmed_bypass_access_check' => TRUE,
405 412
    'cache'=> FALSE,
406 413
    'method' => 'post',
407 414
    'groups' => array(),
......
1985 1992
  // #access=FALSE on an element usually allow access for some users, so forms
1986 1993
  // submitted with drupal_form_submit() may bypass access restriction and be
1987 1994
  // treated as high-privilege users instead.
1988
  $process_input = empty($element['#disabled']) && ($form_state['programmed'] || ($form_state['process_input'] && (!isset($element['#access']) || $element['#access'])));
1995
  $process_input = empty($element['#disabled']) && (($form_state['programmed'] && $form_state['programmed_bypass_access_check']) || ($form_state['process_input'] && (!isset($element['#access']) || $element['#access'])));
1989 1996

  
1990 1997
  // Set the element's #value property.
1991 1998
  if (!isset($element['#value']) && !array_key_exists('#value', $element)) {

Formats disponibles : Unified diff