Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.

Commit f86409c

Browse files
committed
Updated core and all modules - test made on local.dev afterwards
1 parent f2b1c5c commit f86409c

File tree

744 files changed

+21927
-8236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

744 files changed

+21927
-8236
lines changed

CHANGELOG.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11

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+
21+
Drupal 7.53, 2016-12-07
22+
-----------------------
23+
- Fixed drag and drop support on newer Chrome/IE 11+ versions after 7.51 update
24+
when jQuery is updated to 1.7-1.11.0.
25+
226
Drupal 7.52, 2016-11-16
327
-----------------------
428
- Fixed security issues (multiple vulnerabilities). See SA-CORE-2016-005.

includes/bootstrap.inc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* The current system version.
1010
*/
11-
define('VERSION', '7.52');
11+
define('VERSION', '7.54');
1212

1313
/**
1414
* Core API compatibility.
@@ -718,6 +718,16 @@ function drupal_valid_http_host($host) {
718718
&& preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host);
719719
}
720720

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+
721731
/**
722732
* Sets the base URL, cookie domain, and session name from configuration.
723733
*/
@@ -731,7 +741,7 @@ function drupal_settings_initialize() {
731741
if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) {
732742
include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php';
733743
}
734-
$is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
744+
$is_https = drupal_is_https();
735745

736746
if (isset($base_url)) {
737747
// Parse fixed base URL from settings.php.

includes/cache.inc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ function cache_get_multiple(array &$cids, $bin = 'cache') {
122122
* the administrator panel.
123123
* - cache_path: Stores the system paths that have an alias.
124124
* @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:
126131
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
127132
* explicitly told to using cache_clear_all() with a cache ID.
128133
* - CACHE_TEMPORARY: Indicates that the item should be removed at the next
@@ -262,7 +267,12 @@ interface DrupalCacheInterface {
262267
* 1MB in size to be stored by default. When caching large arrays or
263268
* similar, take care to ensure $data does not exceed this size.
264269
* @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:
266276
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
267277
* explicitly told to using cache_clear_all() with a cache ID.
268278
* - CACHE_TEMPORARY: Indicates that the item should be removed at the next

includes/common.inc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,7 +3986,11 @@ function drupal_html_id($id) {
39863986
// be merged with content already on the base page. The HTML IDs must be
39873987
// unique for the fully merged content. Therefore, initialize $seen_ids to
39883988
// 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'];
39903994
if (!isset($seen_ids_init)) {
39913995
// Ideally, Drupal would provide an API to persist state information about
39923996
// prior page requests in the database, and we'd be able to add this
@@ -4031,7 +4035,10 @@ function drupal_html_id($id) {
40314035
}
40324036
}
40334037
}
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'];
40354042

40364043
$id = strtr(drupal_strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
40374044

includes/date.inc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ function system_default_date_formats() {
1212
$formats = array();
1313

1414
// Short date formats.
15-
$formats[] = array(
16-
'type' => 'short',
17-
'format' => 'Y-m-d H:i',
18-
'locales' => array(),
19-
);
2015
$formats[] = array(
2116
'type' => 'short',
2217
'format' => 'm/d/Y - H:i',
@@ -37,6 +32,11 @@ function system_default_date_formats() {
3732
'format' => 'd.m.Y - H:i',
3833
'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'),
3934
);
35+
$formats[] = array(
36+
'type' => 'short',
37+
'format' => 'Y-m-d H:i',
38+
'locales' => array(),
39+
);
4040
$formats[] = array(
4141
'type' => 'short',
4242
'format' => 'm/d/Y - g:ia',
@@ -84,11 +84,6 @@ function system_default_date_formats() {
8484
);
8585

8686
// Medium date formats.
87-
$formats[] = array(
88-
'type' => 'medium',
89-
'format' => 'D, Y-m-d H:i',
90-
'locales' => array(),
91-
);
9287
$formats[] = array(
9388
'type' => 'medium',
9489
'format' => 'D, m/d/Y - H:i',
@@ -104,6 +99,11 @@ function system_default_date_formats() {
10499
'format' => 'D, Y/m/d - H:i',
105100
'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
106101
);
102+
$formats[] = array(
103+
'type' => 'medium',
104+
'format' => 'D, Y-m-d H:i',
105+
'locales' => array(),
106+
);
107107
$formats[] = array(
108108
'type' => 'medium',
109109
'format' => 'F j, Y - H:i',

includes/form.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
11761176
// If the session token was set by drupal_prepare_form(), ensure that it
11771177
// matches the current user's session. This is duplicate to code in
11781178
// form_builder() but left to protect any custom form handling code.
1179-
if (isset($form['#token'])) {
1179+
if (!empty($form['#token'])) {
11801180
if (!drupal_valid_token($form_state['values']['form_token'], $form['#token']) || !empty($form_state['invalid_token'])) {
11811181
_drupal_invalid_token_set_form_error();
11821182
// Stop here and don't run any further validation handlers, because they
@@ -1837,7 +1837,7 @@ function form_builder($form_id, &$element, &$form_state) {
18371837
// If the session token was set by drupal_prepare_form(), ensure that it
18381838
// matches the current user's session.
18391839
$form_state['invalid_token'] = FALSE;
1840-
if (isset($element['#token'])) {
1840+
if (!empty($element['#token'])) {
18411841
if (empty($form_state['input']['form_token']) || !drupal_valid_token($form_state['input']['form_token'], $element['#token'])) {
18421842
// Set an early form error to block certain input processing since that
18431843
// opens the door for CSRF vulnerabilities.

includes/menu.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,6 +1606,7 @@ function _menu_tree_data(&$links, $parents, $depth) {
16061606
* Implements template_preprocess_HOOK() for theme_menu_tree().
16071607
*/
16081608
function template_preprocess_menu_tree(&$variables) {
1609+
$variables['#tree'] = $variables['tree'];
16091610
$variables['tree'] = $variables['tree']['#children'];
16101611
}
16111612

@@ -2682,7 +2683,7 @@ function menu_link_load($mlid) {
26822683
}
26832684

26842685
/**
2685-
* Clears the cached cached data for a single named menu.
2686+
* Clears the cached data for a single named menu.
26862687
*/
26872688
function menu_cache_clear($menu_name = 'navigation') {
26882689
$cache_cleared = &drupal_static(__FUNCTION__, array());

includes/stream_wrappers.inc

Lines changed: 150 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface {
133133
* @param $uri
134134
* A string containing the URI that should be used for this instance.
135135
*/
136-
function setUri($uri);
136+
public function setUri($uri);
137137

138138
/**
139139
* Returns the stream resource URI.
@@ -219,7 +219,6 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface {
219219
public function dirname($uri = NULL);
220220
}
221221

222-
223222
/**
224223
* Drupal stream wrapper base class for local files.
225224
*
@@ -549,6 +548,155 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
549548
return fclose($this->handle);
550549
}
551550

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+
552700
/**
553701
* Support for unlink().
554702
*

misc/tabledrag.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,20 @@ Drupal.tableDrag.prototype.dropRow = function (event, self) {
580580
* Get the mouse coordinates from the event (allowing for browser differences).
581581
*/
582582
Drupal.tableDrag.prototype.mouseCoords = function (event) {
583+
// Complete support for pointer events was only introduced to jQuery in
584+
// version 1.11.1; between versions 1.7 and 1.11.0 pointer events have the
585+
// clientX and clientY properties undefined. In those cases, the properties
586+
// must be retrieved from the event.originalEvent object instead.
587+
var clientX = event.clientX || event.originalEvent.clientX;
588+
var clientY = event.clientY || event.originalEvent.clientY;
589+
583590
if (event.pageX || event.pageY) {
584591
return { x: event.pageX, y: event.pageY };
585592
}
593+
586594
return {
587-
x: event.clientX + document.body.scrollLeft - document.body.clientLeft,
588-
y: event.clientY + document.body.scrollTop - document.body.clientTop
595+
x: clientX + document.body.scrollLeft - document.body.clientLeft,
596+
y: clientY + document.body.scrollTop - document.body.clientTop
589597
};
590598
};
591599

0 commit comments

Comments
 (0)