Projet

Général

Profil

Révision c9e51f47

Ajouté par Julien Enselme il y a environ 7 ans

Udpate to 7.54

Voir les différences:

drupal7/CHANGELOG.txt
1 1

  
2
Drupal 7.54, 2017-02-01
3
-----------------------
4
- Modules are now able to define theme engines (API addition:
5
  https://www.drupal.org/node/2826480).
6
- Logging of searches can now be disabled (new option in the administrative
7
  interface).
8
- Added menu tree render structure to (pre-)process hooks for theme_menu_tree()
9
  (API addition: https://www.drupal.org/node/2827134).
10
- Added new function for determining whether an HTTPS request is being served
11
  (API addition: https://www.drupal.org/node/2824590).
12
- Fixed incorrect default value for short and medium date formats on the date
13
  type configuration page.
14
- File validation error message is now removed after subsequent upload of valid
15
  file.
16
- Numerous bug fixes.
17
- Numerous API documentation improvements.
18
- Additional performance improvements.
19
- Additional automated test coverage.
20

  
2 21
Drupal 7.53, 2016-12-07
3 22
-----------------------
4 23
- Fixed drag and drop support on newer Chrome/IE 11+ versions after 7.51 update
drupal7/includes/bootstrap.inc
8 8
/**
9 9
 * The current system version.
10 10
 */
11
define('VERSION', '7.53');
11
define('VERSION', '7.54');
12 12

  
13 13
/**
14 14
 * Core API compatibility.
......
718 718
    && preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host);
719 719
}
720 720

  
721
/**
722
 * Checks whether an HTTPS request is being served.
723
 *
724
 * @return bool
725
 *   TRUE if the request is HTTPS, FALSE otherwise.
726
 */
727
function drupal_is_https() {
728
  return isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
729
}
730

  
721 731
/**
722 732
 * Sets the base URL, cookie domain, and session name from configuration.
723 733
 */
......
731 741
  if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) {
732 742
    include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php';
733 743
  }
734
  $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
744
  $is_https = drupal_is_https();
735 745

  
736 746
  if (isset($base_url)) {
737 747
    // Parse fixed base URL from settings.php.
drupal7/includes/cache.inc
122 122
 *     the administrator panel.
123 123
 *   - cache_path: Stores the system paths that have an alias.
124 124
 * @param $expire
125
 *   (optional) One of the following values:
125
 *   (optional) Controls the maximum lifetime of this cache entry. Note that
126
 *   caches might be subject to clearing at any time, so this setting does not
127
 *   guarantee a minimum lifetime. With this in mind, the cache should not be
128
 *   used for data that must be kept during a cache clear, like sessions.
129
 *
130
 *   Use one of the following values:
126 131
 *   - CACHE_PERMANENT: Indicates that the item should never be removed unless
127 132
 *     explicitly told to using cache_clear_all() with a cache ID.
128 133
 *   - CACHE_TEMPORARY: Indicates that the item should be removed at the next
......
262 267
   *   1MB in size to be stored by default. When caching large arrays or
263 268
   *   similar, take care to ensure $data does not exceed this size.
264 269
   * @param $expire
265
   *   (optional) One of the following values:
270
   *   (optional) Controls the maximum lifetime of this cache entry. Note that
271
   *   caches might be subject to clearing at any time, so this setting does not
272
   *   guarantee a minimum lifetime. With this in mind, the cache should not be
273
   *   used for data that must be kept during a cache clear, like sessions.
274
   *
275
   *   Use one of the following values:
266 276
   *   - CACHE_PERMANENT: Indicates that the item should never be removed unless
267 277
   *     explicitly told to using cache_clear_all() with a cache ID.
268 278
   *   - CACHE_TEMPORARY: Indicates that the item should be removed at the next
drupal7/includes/common.inc
3986 3986
  // be merged with content already on the base page. The HTML IDs must be
3987 3987
  // unique for the fully merged content. Therefore, initialize $seen_ids to
3988 3988
  // take into account IDs that are already in use on the base page.
3989
  $seen_ids_init = &drupal_static(__FUNCTION__ . ':init');
3989
  static $drupal_static_fast;
3990
  if (!isset($drupal_static_fast['seen_ids_init'])) {
3991
    $drupal_static_fast['seen_ids_init'] = &drupal_static(__FUNCTION__ . ':init');
3992
  }
3993
  $seen_ids_init = &$drupal_static_fast['seen_ids_init'];
3990 3994
  if (!isset($seen_ids_init)) {
3991 3995
    // Ideally, Drupal would provide an API to persist state information about
3992 3996
    // prior page requests in the database, and we'd be able to add this
......
4031 4035
      }
4032 4036
    }
4033 4037
  }
4034
  $seen_ids = &drupal_static(__FUNCTION__, $seen_ids_init);
4038
  if (!isset($drupal_static_fast['seen_ids'])) {
4039
    $drupal_static_fast['seen_ids'] = &drupal_static(__FUNCTION__, $seen_ids_init);
4040
  }
4041
  $seen_ids = &$drupal_static_fast['seen_ids'];
4035 4042

  
4036 4043
  $id = strtr(drupal_strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
4037 4044

  
drupal7/includes/date.inc
12 12
  $formats = array();
13 13

  
14 14
  // Short date formats.
15
  $formats[] = array(
16
    'type' => 'short',
17
    'format' => 'Y-m-d H:i',
18
    'locales' => array(),
19
  );
20 15
  $formats[] = array(
21 16
    'type' => 'short',
22 17
    'format' => 'm/d/Y - H:i',
......
37 32
    'format' => 'd.m.Y - H:i',
38 33
    'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'),
39 34
  );
35
  $formats[] = array(
36
    'type' => 'short',
37
    'format' => 'Y-m-d H:i',
38
    'locales' => array(),
39
  );
40 40
  $formats[] = array(
41 41
    'type' => 'short',
42 42
    'format' => 'm/d/Y - g:ia',
......
84 84
  );
85 85

  
86 86
  // Medium date formats.
87
  $formats[] = array(
88
    'type' => 'medium',
89
    'format' => 'D, Y-m-d H:i',
90
    'locales' => array(),
91
  );
92 87
  $formats[] = array(
93 88
    'type' => 'medium',
94 89
    'format' => 'D, m/d/Y - H:i',
......
104 99
    'format' => 'D, Y/m/d - H:i',
105 100
    'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
106 101
  );
102
  $formats[] = array(
103
    'type' => 'medium',
104
    'format' => 'D, Y-m-d H:i',
105
    'locales' => array(),
106
  );
107 107
  $formats[] = array(
108 108
    'type' => 'medium',
109 109
    'format' => 'F j, Y - H:i',
drupal7/includes/form.inc
1176 1176
  // If the session token was set by drupal_prepare_form(), ensure that it
1177 1177
  // matches the current user's session. This is duplicate to code in
1178 1178
  // form_builder() but left to protect any custom form handling code.
1179
  if (isset($form['#token'])) {
1179
  if (!empty($form['#token'])) {
1180 1180
    if (!drupal_valid_token($form_state['values']['form_token'], $form['#token']) || !empty($form_state['invalid_token'])) {
1181 1181
      _drupal_invalid_token_set_form_error();
1182 1182
      // Stop here and don't run any further validation handlers, because they
......
1837 1837
      // If the session token was set by drupal_prepare_form(), ensure that it
1838 1838
      // matches the current user's session.
1839 1839
      $form_state['invalid_token'] = FALSE;
1840
      if (isset($element['#token'])) {
1840
      if (!empty($element['#token'])) {
1841 1841
        if (empty($form_state['input']['form_token']) || !drupal_valid_token($form_state['input']['form_token'], $element['#token'])) {
1842 1842
          // Set an early form error to block certain input processing since that
1843 1843
          // opens the door for CSRF vulnerabilities.
drupal7/includes/menu.inc
1606 1606
 * Implements template_preprocess_HOOK() for theme_menu_tree().
1607 1607
 */
1608 1608
function template_preprocess_menu_tree(&$variables) {
1609
  $variables['#tree'] = $variables['tree'];
1609 1610
  $variables['tree'] = $variables['tree']['#children'];
1610 1611
}
1611 1612

  
......
2682 2683
}
2683 2684

  
2684 2685
/**
2685
 * Clears the cached cached data for a single named menu.
2686
 * Clears the cached data for a single named menu.
2686 2687
 */
2687 2688
function menu_cache_clear($menu_name = 'navigation') {
2688 2689
  $cache_cleared = &drupal_static(__FUNCTION__, array());
drupal7/includes/stream_wrappers.inc
133 133
   * @param $uri
134 134
   *   A string containing the URI that should be used for this instance.
135 135
   */
136
  function setUri($uri);
136
  public function setUri($uri);
137 137

  
138 138
  /**
139 139
   * Returns the stream resource URI.
......
219 219
  public function dirname($uri = NULL);
220 220
}
221 221

  
222

  
223 222
/**
224 223
 * Drupal stream wrapper base class for local files.
225 224
 *
......
549 548
    return fclose($this->handle);
550 549
  }
551 550

  
551
  /**
552
   * Sets metadata on the stream.
553
   *
554
   * WARNING: Do not call this method directly! It will be called internally by
555
   * PHP itself when one of the following functions is called on a stream URL:
556
   *
557
   * @param string $uri
558
   *   A string containing the URI to the file to set metadata on.
559
   * @param int $option
560
   *   One of:
561
   *   - STREAM_META_TOUCH: The method was called in response to touch().
562
   *   - STREAM_META_OWNER_NAME: The method was called in response to chown()
563
   *     with string parameter.
564
   *   - STREAM_META_OWNER: The method was called in response to chown().
565
   *   - STREAM_META_GROUP_NAME: The method was called in response to chgrp().
566
   *   - STREAM_META_GROUP: The method was called in response to chgrp().
567
   *   - STREAM_META_ACCESS: The method was called in response to chmod().
568
   * @param mixed $value
569
   *   If option is:
570
   *   - STREAM_META_TOUCH: Array consisting of two arguments of the touch()
571
   *     function.
572
   *   - STREAM_META_OWNER_NAME or STREAM_META_GROUP_NAME: The name of the owner
573
   *     user/group as string.
574
   *   - STREAM_META_OWNER or STREAM_META_GROUP: The value of the owner
575
   *     user/group as integer.
576
   *   - STREAM_META_ACCESS: The argument of the chmod() as integer.
577
   *
578
   * @return bool
579
   *   Returns TRUE on success or FALSE on failure. If $option is not
580
   *   implemented, FALSE should be returned.
581
   *
582
   * @see touch()
583
   * @see chmod()
584
   * @see chown()
585
   * @see chgrp()
586
   * @link http://php.net/manual/streamwrapper.stream-metadata.php
587
   */
588
  public function stream_metadata($uri, $option, $value) {
589
    $target = $this->getLocalPath($uri);
590
    $return = FALSE;
591
    switch ($option) {
592
      case STREAM_META_TOUCH:
593
        if (!empty($value)) {
594
          $return = touch($target, $value[0], $value[1]);
595
        }
596
        else {
597
          $return = touch($target);
598
        }
599
        break;
600

  
601
      case STREAM_META_OWNER_NAME:
602
      case STREAM_META_OWNER:
603
        $return = chown($target, $value);
604
        break;
605

  
606
      case STREAM_META_GROUP_NAME:
607
      case STREAM_META_GROUP:
608
        $return = chgrp($target, $value);
609
        break;
610

  
611
      case STREAM_META_ACCESS:
612
        $return = chmod($target, $value);
613
        break;
614
    }
615
    if ($return) {
616
      // For convenience clear the file status cache of the underlying file,
617
      // since metadata operations are often followed by file status checks.
618
      clearstatcache(TRUE, $target);
619
    }
620
    return $return;
621
  }
622

  
623
  /**
624
   * Truncate stream.
625
   *
626
   * Will respond to truncation; e.g., through ftruncate().
627
   *
628
   * @param int $new_size
629
   *   The new size.
630
   *
631
   * @return bool
632
   *   TRUE on success, FALSE otherwise.
633
   */
634
  public function stream_truncate($new_size) {
635
    return ftruncate($this->handle, $new_size);
636
  }
637

  
638
  /**
639
   * Retrieve the underlying stream resource.
640
   *
641
   * This method is called in response to stream_select().
642
   *
643
   * @param int $cast_as
644
   *   Can be STREAM_CAST_FOR_SELECT when stream_select() is calling
645
   *   stream_cast() or STREAM_CAST_AS_STREAM when stream_cast() is called for
646
   *   other uses.
647
   *
648
   * @return resource|false
649
   *   The underlying stream resource or FALSE if stream_select() is not
650
   *   supported.
651
   *
652
   * @see stream_select()
653
   * @link http://php.net/manual/streamwrapper.stream-cast.php
654
   */
655
  public function stream_cast($cast_as) {
656
    return $this->handle ? $this->handle : FALSE;
657
  }
658

  
659
  /**
660
   * Change stream options.
661
   *
662
   * This method is called to set options on the stream.
663
   *
664
   * Since Windows systems do not allow it and it is not needed for most use
665
   * cases anyway, this method is not supported on local files and will trigger
666
   * an error and return false. If needed, custom subclasses can provide
667
   * OS-specific implementations for advanced use cases.
668
   *
669
   * @param int $option
670
   *   One of:
671
   *   - STREAM_OPTION_BLOCKING: The method was called in response to
672
   *     stream_set_blocking().
673
   *   - STREAM_OPTION_READ_TIMEOUT: The method was called in response to
674
   *     stream_set_timeout().
675
   *   - STREAM_OPTION_WRITE_BUFFER: The method was called in response to
676
   *     stream_set_write_buffer().
677
   * @param int $arg1
678
   *   If option is:
679
   *   - STREAM_OPTION_BLOCKING: The requested blocking mode:
680
   *     - 1 means blocking.
681
   *     - 0 means not blocking.
682
   *   - STREAM_OPTION_READ_TIMEOUT: The timeout in seconds.
683
   *   - STREAM_OPTION_WRITE_BUFFER: The buffer mode, STREAM_BUFFER_NONE or
684
   *     STREAM_BUFFER_FULL.
685
   * @param int $arg2
686
   *   If option is:
687
   *   - STREAM_OPTION_BLOCKING: This option is not set.
688
   *   - STREAM_OPTION_READ_TIMEOUT: The timeout in microseconds.
689
   *   - STREAM_OPTION_WRITE_BUFFER: The requested buffer size.
690
   *
691
   * @return bool
692
   *   TRUE on success, FALSE otherwise. If $option is not implemented, FALSE
693
   *   should be returned.
694
   */
695
  public function stream_set_option($option, $arg1, $arg2) {
696
    trigger_error('stream_set_option() not supported for local file based stream wrappers', E_USER_WARNING);
697
    return FALSE;
698
  }
699

  
552 700
  /**
553 701
   * Support for unlink().
554 702
   *
drupal7/modules/aggregator/aggregator.info
7 7
configure = admin/config/services/aggregator/settings
8 8
stylesheets[all][] = aggregator.css
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/aggregator/tests/aggregator_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/block/block.info
6 6
files[] = block.test
7 7
configure = admin/structure/block
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/block/tests/block_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/block/tests/themes/block_test_theme/block_test_theme.info
13 13
regions[highlighted] = Highlighted
14 14
regions[help] = Help
15 15

  
16
; Information added by Drupal.org packaging script on 2016-12-07
17
version = "7.53"
16
; Information added by Drupal.org packaging script on 2017-02-01
17
version = "7.54"
18 18
project = "drupal"
19
datestamp = "1481152423"
19
datestamp = "1485986921"
20 20

  
drupal7/modules/blog/blog.info
5 5
core = 7.x
6 6
files[] = blog.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/book/book.info
7 7
configure = admin/content/book/settings
8 8
stylesheets[all][] = book.css
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/color/color.info
5 5
core = 7.x
6 6
files[] = color.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/color/color.test
122 122
      $edit['palette[bg]'] = $color;
123 123
      $this->drupalPost($settings_path, $edit, t('Save configuration'));
124 124

  
125
      if($is_valid) {
125
      if ($is_valid) {
126 126
        $this->assertText('The configuration options have been saved.');
127 127
      }
128 128
      else {
drupal7/modules/comment/comment.info
9 9
configure = admin/content/comment
10 10
stylesheets[all][] = comment.css
11 11

  
12
; Information added by Drupal.org packaging script on 2016-12-07
13
version = "7.53"
12
; Information added by Drupal.org packaging script on 2017-02-01
13
version = "7.54"
14 14
project = "drupal"
15
datestamp = "1481152423"
15
datestamp = "1485986921"
16 16

  
drupal7/modules/comment/comment.test
11 11
  protected $node;
12 12

  
13 13
  function setUp() {
14
    parent::setUp('comment', 'search');
14
    $modules = func_get_args();
15
    if (isset($modules[0]) && is_array($modules[0])) {
16
      $modules = $modules[0];
17
    }
18
    $modules[] = 'comment';
19
    parent::setUp($modules);
20

  
15 21
    // Create users and test node.
16 22
    $this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer comments', 'administer blocks', 'administer actions', 'administer fields'));
17 23
    $this->web_user = $this->drupalCreateUser(array('access comments', 'post comments', 'create article content', 'edit own comments'));
......
1490 1496
  }
1491 1497

  
1492 1498
  function setUp() {
1493
    DrupalWebTestCase::setUp('comment', 'search', 'node_access_test');
1499
    parent::setUp('search', 'node_access_test');
1494 1500
    node_access_rebuild();
1495 1501

  
1496 1502
    // Create users and test node.
drupal7/modules/contact/contact.info
6 6
files[] = contact.test
7 7
configure = admin/structure/contact
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/contextual/contextual.info
5 5
core = 7.x
6 6
files[] = contextual.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/dashboard/dashboard.info
7 7
dependencies[] = block
8 8
configure = admin/dashboard/customize
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/dblog/dblog.admin.inc
420 420
 */
421 421
function dblog_clear_log_submit() {
422 422
  $_SESSION['dblog_overview_filter'] = array();
423
  db_delete('watchdog')->execute();
423
  db_truncate('watchdog')->execute();
424 424
  drupal_set_message(t('Database log cleared.'));
425 425
}
drupal7/modules/dblog/dblog.info
5 5
core = 7.x
6 6
files[] = dblog.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/field/field.info
11 11
required = TRUE
12 12
stylesheets[all][] = theme/field.css
13 13

  
14
; Information added by Drupal.org packaging script on 2016-12-07
15
version = "7.53"
14
; Information added by Drupal.org packaging script on 2017-02-01
15
version = "7.54"
16 16
project = "drupal"
17
datestamp = "1481152423"
17
datestamp = "1485986921"
18 18

  
drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info
7 7
files[] = field_sql_storage.test
8 8
required = TRUE
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/field/modules/list/list.info
7 7
dependencies[] = options
8 8
files[] = tests/list.test
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/field/modules/list/tests/list_test.info
5 5
version = VERSION
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/field/modules/number/number.info
6 6
dependencies[] = field
7 7
files[] = number.test
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/field/modules/number/number.module
164 164
      }
165 165
    }
166 166
  }
167
  if ($field['type'] == 'number_float') {
168
    // Remove the decimal point from float values with decimal
169
    // point but no decimal numbers.
170
    foreach ($items as $delta => $item) {
171
      if (isset($item['value'])) {
172
        $items[$delta]['value'] = floatval($item['value']);
173
      }
174
    }
175
  }
167 176
}
168 177

  
169 178
/**
drupal7/modules/field/modules/number/number.test
152 152
    );
153 153
    $this->drupalPost(NULL, $edit, t('Save'));
154 154
  }
155

  
156
  /**
157
   * Test number_float field.
158
   */
159
  function testNumberFloatField() {
160
    $this->field = array(
161
      'field_name' => drupal_strtolower($this->randomName()),
162
      'type' => 'number_float',
163
      'settings' => array(
164
        'precision' => 8, 'scale' => 4, 'decimal_separator' => '.',
165
      )
166
    );
167
    field_create_field($this->field);
168
    $this->instance = array(
169
      'field_name' => $this->field['field_name'],
170
      'entity_type' => 'test_entity',
171
      'bundle' => 'test_bundle',
172
      'widget' => array(
173
        'type' => 'number',
174
      ),
175
      'display' => array(
176
        'default' => array(
177
          'type' => 'number_float',
178
        ),
179
      ),
180
    );
181
    field_create_instance($this->instance);
182

  
183
    $langcode = LANGUAGE_NONE;
184
    $value = array(
185
      '9.' => '9',
186
      '.' => '0',
187
      '123.55' => '123.55',
188
      '.55' => '0.55',
189
      '-0.55' => '-0.55',
190
    );
191
    foreach($value as $key => $value) {
192
      $edit = array(
193
        "{$this->field['field_name']}[$langcode][0][value]" => $key,
194
      );
195
      $this->drupalPost('test-entity/add/test-bundle', $edit, t('Save'));
196
      $this->assertNoText("PDOException");
197
      $this->assertRaw($value, 'Correct value is displayed.');
198
    }
199
  }
200

  
155 201
}
drupal7/modules/field/modules/options/options.info
6 6
dependencies[] = field
7 7
files[] = options.test
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/field/modules/options/options.test
23 23
      'type' => 'list_integer',
24 24
      'cardinality' => 1,
25 25
      'settings' => array(
26
        // Make sure that 0 works as an option.
27
        'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',  3 => 'Some HTML encoded markup with &lt; &amp; &gt;'),
26
        'allowed_values' => array(
27
          // Make sure that 0 works as an option.
28
          0 => 'Zero',
29
          1 => 'One',
30
          // Make sure that option text is properly sanitized.
31
          2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
32
          // Make sure that HTML entities in option text are not double-encoded.
33
          3 => 'Some HTML encoded markup with &lt; &amp; &gt;',
34
        ),
28 35
      ),
29 36
    );
30 37
    $this->card_1 = field_create_field($this->card_1);
......
35 42
      'type' => 'list_integer',
36 43
      'cardinality' => 2,
37 44
      'settings' => array(
38
        // Make sure that 0 works as an option.
39
        'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
45
        'allowed_values' => array(
46
          // Make sure that 0 works as an option.
47
          0 => 'Zero',
48
          1 => 'One',
49
          // Make sure that option text is properly sanitized.
50
          2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
51
        ),
40 52
      ),
41 53
    );
42 54
    $this->card_2 = field_create_field($this->card_2);
......
47 59
      'type' => 'list_boolean',
48 60
      'cardinality' => 1,
49 61
      'settings' => array(
50
        // Make sure that 0 works as a 'on' value'.
51
        'allowed_values' => array(1 => 'Zero', 0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
62
        'allowed_values' => array(
63
          // Make sure that 1 works as a 'on' value'.
64
          1 => 'Zero',
65
          // Make sure that option text is properly sanitized.
66
          0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
67
        ),
52 68
      ),
53 69
    );
54 70
    $this->bool = field_create_field($this->bool);
drupal7/modules/field/modules/text/text.info
7 7
files[] = text.test
8 8
required = TRUE
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/field/tests/field_test.info
6 6
version = VERSION
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/field_ui/field_ui.info
6 6
dependencies[] = field
7 7
files[] = field_ui.test
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/file/file.info
6 6
dependencies[] = field
7 7
files[] = tests/file.test
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/file/file.module
280 280
    $form['#suffix'] .= '<span class="ajax-new-content"></span>';
281 281
  }
282 282

  
283
  $output = theme('status_messages') . drupal_render($form);
283
  $form['#prefix'] .= theme('status_messages');
284
  $output = drupal_render($form);
284 285
  $js = drupal_add_js();
285 286
  $settings = call_user_func_array('array_merge_recursive', $js['settings']['data']);
286 287

  
drupal7/modules/file/tests/file.test
596 596
    $this->doTestTemporaryFileRemovalExploit($victim_uid, $attacker_uid);
597 597
  }
598 598

  
599
  /**
600
   * Tests validation with the Upload button.
601
   */
602
  function testWidgetValidation() {
603
    $type_name = 'article';
604
    $field_name = strtolower($this->randomName());
605
    $this->createFileField($field_name, $type_name);
606
    $this->updateFileField($field_name, $type_name, array('file_extensions' => 'txt'));
607

  
608
    foreach (array('nojs', 'js') as $type) {
609
      // Create node and prepare files for upload.
610
      $node = $this->drupalCreateNode(array('type' => 'article'));
611
      $nid = $node->nid;
612
      $this->drupalGet("node/$nid/edit");
613
      $test_file_text = $this->getTestFile('text');
614
      $test_file_image = $this->getTestFile('image');
615
      $field = field_info_field($field_name);
616
      $name = 'files[' . $field_name . '_' . LANGUAGE_NONE . '_0]';
617

  
618
      // Upload file with incorrect extension, check for validation error.
619
      $edit[$name] = drupal_realpath($test_file_image->uri);
620
      switch ($type) {
621
        case 'nojs':
622
          $this->drupalPost(NULL, $edit, t('Upload'));
623
          break;
624

  
625
        case 'js':
626
          $button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]');
627
          $this->drupalPostAJAX(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value']));
628
          break;
629
      }
630
      $error_message = t('Only files with the following extensions are allowed: %files-allowed.', array('%files-allowed' => 'txt'));
631
      $this->assertRaw($error_message, t('Validation error when file with wrong extension uploaded (JSMode=%type).', array('%type' => $type)));
632

  
633
      // Upload file with correct extension, check that error message is removed.
634
      $edit[$name] = drupal_realpath($test_file_text->uri);
635
      switch ($type) {
636
        case 'nojs':
637
          $this->drupalPost(NULL, $edit, t('Upload'));
638
          break;
639

  
640
        case 'js':
641
          $button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]');
642
          $this->drupalPostAJAX(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value']));
643
          break;
644
      }
645
      $this->assertNoRaw($error_message, t('Validation error removed when file with correct extension uploaded (JSMode=%type).', array('%type' => $type)));
646
    }
647
  }
648

  
599 649
  /**
600 650
   * Helper for testing exploiting the temporary file removal using fid.
601 651
   *
drupal7/modules/file/tests/file_module_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/filter/filter.info
7 7
required = TRUE
8 8
configure = admin/config/content/formats
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/filter/filter.module
1638 1638
  // Replace all HTML coments with a '<!-- [hash] -->' placeholder.
1639 1639
  if ($mode) {
1640 1640
    $content = $match[1];
1641
    $hash = md5($content);
1641
    $hash = hash('sha256', $content);
1642 1642
    $comments[$hash] = $content;
1643 1643
    return "<!-- $hash -->";
1644 1644
  }
drupal7/modules/forum/forum.info
9 9
configure = admin/structure/forum
10 10
stylesheets[all][] = forum.css
11 11

  
12
; Information added by Drupal.org packaging script on 2016-12-07
13
version = "7.53"
12
; Information added by Drupal.org packaging script on 2017-02-01
13
version = "7.54"
14 14
project = "drupal"
15
datestamp = "1481152423"
15
datestamp = "1485986921"
16 16

  
drupal7/modules/help/help.info
5 5
core = 7.x
6 6
files[] = help.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/image/image.info
7 7
files[] = image.test
8 8
configure = admin/config/media/image-styles
9 9

  
10
; Information added by Drupal.org packaging script on 2016-12-07
11
version = "7.53"
10
; Information added by Drupal.org packaging script on 2017-02-01
11
version = "7.54"
12 12
project = "drupal"
13
datestamp = "1481152423"
13
datestamp = "1485986921"
14 14

  
drupal7/modules/image/tests/image_module_test.info
6 6
files[] = image_module_test.module
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/locale/locale.info
6 6
files[] = locale.test
7 7
configure = admin/config/regional/language
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/locale/tests/locale_test.info
5 5
version = VERSION
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/menu/menu.info
6 6
files[] = menu.test
7 7
configure = admin/structure/menu
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/node/node.info
9 9
configure = admin/structure/types
10 10
stylesheets[all][] = node.css
11 11

  
12
; Information added by Drupal.org packaging script on 2016-12-07
13
version = "7.53"
12
; Information added by Drupal.org packaging script on 2017-02-01
13
version = "7.54"
14 14
project = "drupal"
15
datestamp = "1481152423"
15
datestamp = "1485986921"
16 16

  
drupal7/modules/node/tests/node_access_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/node/tests/node_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/node/tests/node_test_exception.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/openid/openid.info
5 5
core = 7.x
6 6
files[] = openid.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/openid/tests/openid_test.info
6 6
dependencies[] = openid
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/overlay/overlay.info
4 4
version = VERSION
5 5
core = 7.x
6 6

  
7
; Information added by Drupal.org packaging script on 2016-12-07
8
version = "7.53"
7
; Information added by Drupal.org packaging script on 2017-02-01
8
version = "7.54"
9 9
project = "drupal"
10
datestamp = "1481152423"
10
datestamp = "1485986921"
11 11

  
drupal7/modules/path/path.info
6 6
files[] = path.test
7 7
configure = admin/config/search/path
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/php/php.info
5 5
core = 7.x
6 6
files[] = php.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/poll/poll.info
6 6
files[] = poll.test
7 7
stylesheets[all][] = poll.css
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/profile/profile.info
11 11
; See user_system_info_alter().
12 12
hidden = TRUE
13 13

  
14
; Information added by Drupal.org packaging script on 2016-12-07
15
version = "7.53"
14
; Information added by Drupal.org packaging script on 2017-02-01
15
version = "7.54"
16 16
project = "drupal"
17
datestamp = "1481152423"
17
datestamp = "1485986921"
18 18

  
drupal7/modules/rdf/rdf.info
5 5
core = 7.x
6 6
files[] = rdf.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-12-07
9
version = "7.53"
8
; Information added by Drupal.org packaging script on 2017-02-01
9
version = "7.54"
10 10
project = "drupal"
11
datestamp = "1481152423"
11
datestamp = "1485986921"
12 12

  
drupal7/modules/rdf/tests/rdf_test.info
6 6
hidden = TRUE
7 7
dependencies[] = blog
8 8

  
9
; Information added by Drupal.org packaging script on 2016-12-07
10
version = "7.53"
9
; Information added by Drupal.org packaging script on 2017-02-01
10
version = "7.54"
11 11
project = "drupal"
12
datestamp = "1481152423"
12
datestamp = "1485986921"
13 13

  
drupal7/modules/search/search.admin.inc
125 125
    '#options' => $module_options,
126 126
    '#description' => t('Choose which search module is the default.')
127 127
  );
128
  $form['logging'] = array(
129
    '#type' => 'fieldset',
130
    '#title' => t('Logging')
131
  );
132
  $form['logging']['search_logging'] = array(
133
    '#type' => 'checkbox',
134
    '#title' => t('Log searches'),
135
    '#default_value' => variable_get('search_logging', 1),
136
    '#description' => t('If checked, all searches will be logged. Uncheck to skip logging. Logging may affect performance.'),
137
  );
128 138
  $form['#validate'][] = 'search_admin_settings_validate';
129 139
  $form['#submit'][] = 'search_admin_settings_submit';
130 140

  
drupal7/modules/search/search.info
8 8
configure = admin/config/search/settings
9 9
stylesheets[all][] = search.css
10 10

  
11
; Information added by Drupal.org packaging script on 2016-12-07
12
version = "7.53"
11
; Information added by Drupal.org packaging script on 2017-02-01
12
version = "7.54"
13 13
project = "drupal"
14
datestamp = "1481152423"
14
datestamp = "1485986921"
15 15

  
drupal7/modules/search/search.install
12 12
  variable_del('minimum_word_size');
13 13
  variable_del('overlap_cjk');
14 14
  variable_del('search_cron_limit');
15
  variable_del('search_logging');
15 16
}
16 17

  
17 18
/**
drupal7/modules/search/search.pages.inc
57 57
    }
58 58
    // Only search if there are keywords or non-empty conditions.
59 59
    if ($keys || !empty($conditions)) {
60
      // Log the search keys.
61
      watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys));
62

  
60
       if (variable_get('search_logging', TRUE)) {
61
         // Log the search keys.
62
         watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys));
63
       }
63 64
      // Collect the search results.
64 65
      $results = search_data($keys, $info['module'], $conditions);
65 66
    }
drupal7/modules/search/search.test
1453 1453
    parent::setUp('search', 'search_extra_type');
1454 1454

  
1455 1455
    // Login as a user that can create and search content.
1456
    $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks'));
1456
    $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks', 'access site reports'));
1457 1457
    $this->drupalLogin($this->search_user);
1458 1458

  
1459 1459
    // Add a single piece of content and index it.
......
1502 1502
    );
1503 1503
    $this->drupalPost('admin/config/search/settings', $edit, t('Save configuration'));
1504 1504
    $this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.');
1505

  
1506
    // Test logging setting. It should be on by default.
1507
    $text = $this->randomName(5);
1508
    $this->drupalPost('search/node', array('keys' => $text), t('Search'));
1509
    $this->drupalGet('admin/reports/dblog');
1510
    $this->assertLink('Searched Content for ' . $text . '.', 0, 'Search was logged');
1511

  
1512
    // Turn off logging.
1513
    variable_set('search_logging', FALSE);
1514
    $text = $this->randomName(5);
1515
    $this->drupalPost('search/node', array('keys' => $text), t('Search'));
1516
    $this->drupalGet('admin/reports/dblog');
1517
    $this->assertNoLink('Searched Content for ' . $text . '.', 'Search was not logged');
1505 1518
  }
1506 1519

  
1507 1520
  /**
drupal7/modules/search/tests/search_embedded_form.info
5 5
core = 7.x
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff