Projet

Général

Profil

Révision 8c72e82a

Ajouté par Assos Assos il y a environ 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/webform/includes/webform.webformconditionals.inc
140 140
              }
141 141
              if ($source_component['page_num'] > $page_num) {
142 142
                $errors[$page_num][] = t('A forward reference from page @from, %from to %to was found.',
143
                                         array(
144
                                            '%from' => $source_component['name'],
145
                                            '@from' => $source_component['page_num'],
146
                                            '%to' => $component['name'],
147
                                         ));
143
                  array(
144
                    '%from' => $source_component['name'],
145
                    '@from' => $source_component['page_num'],
146
                    '%to' => $component['name'],
147
                  ));
148 148
              }
149 149
              elseif ($source_component['page_num'] == $page_num && $component['type'] == 'pagebreak') {
150 150
                $errors[$page_num][] = t('The page break %to can\'t be controlled by %from on the same page.',
151
                                         array(
152
                                            '%from' => $source_component['name'],
153
                                            '%to' => $component['name'],
154
                                         ));
151
                  array(
152
                    '%from' => $source_component['name'],
153
                    '%to' => $component['name'],
154
                  ));
155 155
              }
156 156
            }
157 157
          }
......
207 207
        foreach ($nodes as $id => $n) {
208 208
          if ($n['in'] || $n['out']) {
209 209
            $errors[$page_num][] = t('A circular reference involving %name was found.',
210
                                     array('%name' => $components[$id]['name']));
210
              array('%name' => $components[$id]['name']));
211 211
          }
212 212
        }
213 213

  
......
254 254
      if (webform_node_update_access($this->node)) {
255 255
        foreach ($this->errors as $page_num => $page_errors) {
256 256
          drupal_set_message(format_plural(count($page_errors),
257
                                           'Conditional error on page @num:',
258
                                           'Conditional errors on page @num:',
259
                                           array('@num' => $page_num)) .
260
                             '<br /><ul><li>' . implode('</li><li>', $page_errors) . '</li></ul>', 'warning');
257
            'Conditional error on page @num:',
258
            'Conditional errors on page @num:',
259
            array('@num' => $page_num)) .
260
            '<br /><ul><li>' . implode('</li><li>', $page_errors) . '</li></ul>', 'warning');
261 261
        }
262 262
      }
263 263
      else {
264
         drupal_set_message(t('This form is improperly configured. Contact the administrator.'), 'warning');
264
        drupal_set_message(t('This form is improperly configured. Contact the administrator.'), 'warning');
265 265
      }
266 266
    }
267 267
  }
......
366 366
      $this->requiredMap = array_fill(1, count($this->pageMap), array());
367 367
      $this->setMap = $this->requiredMap;
368 368
      $this->markupMap = $this->requiredMap;
369
    } 
369
    }
370 370
    else {
371 371
      array_walk($this->visibilityMap[$page_num], function (&$status) {
372 372
        $status = WebformConditionals::componentShown;
......
387 387
    $last_page = $page_num ? $page_num : count($this->topologicalOrder);
388 388
    for ($page = $first_page; $page <= $last_page; $page++) {
389 389
      foreach ($this->topologicalOrder[$page] as $conditional_spec) {
390
        
390

  
391 391
        $conditional = $conditionals[$conditional_spec['rgid']];
392 392
        $source_page_nums = array();
393 393

  
......
422 422
              // without building it. It is possible that the component include file
423 423
              // hasn't been included yet. See #2529246.
424 424
              webform_component_include($source_component['type']);
425

  
426
              // Load missing include files for conditional types.
427
              // In the case of the 'string', 'date', and 'time' conditional types, it is
428
              // not necessary to load their include files for conditional behavior
429
              // because the required functions are already loaded
430
              // in webform.conditionals.inc.
431
              switch ($conditional_type) {
432
                case 'numeric':
433
                  module_load_include('inc', 'webform', 'components/number');
434
                  break;
435
                case 'select':
436
                  module_load_include('inc', 'webform', 'components/select');
437
                  break;
438
              }
439

  
425 440
              $this->executionStackAccumulate($comparison_callback($source_values, $rule['value'], $source_component));
426 441

  
427 442
              // Record page number to later determine any intra-page dependency on this source.

Formats disponibles : Unified diff