updated drupal core to 7.43
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
/**
|
||||
* The current system version.
|
||||
*/
|
||||
define('VERSION', '7.39');
|
||||
define('VERSION', '7.43');
|
||||
|
||||
/**
|
||||
* Core API compatibility.
|
||||
@@ -1055,7 +1055,7 @@ function drupal_page_get_cache($check_only = FALSE) {
|
||||
* Determines the cacheability of the current page.
|
||||
*
|
||||
* @param $allow_caching
|
||||
* Set to FALSE if you want to prevent this page to get cached.
|
||||
* Set to FALSE if you want to prevent this page from being cached.
|
||||
*
|
||||
* @return
|
||||
* TRUE if the current page can be cached, FALSE otherwise.
|
||||
@@ -1262,6 +1262,10 @@ function drupal_page_header() {
|
||||
$default_headers = array(
|
||||
'Expires' => 'Sun, 19 Nov 1978 05:00:00 GMT',
|
||||
'Cache-Control' => 'no-cache, must-revalidate, post-check=0, pre-check=0',
|
||||
// Prevent browsers from sniffing a response and picking a MIME type
|
||||
// different from the declared content-type, since that can lead to
|
||||
// XSS and other vulnerabilities.
|
||||
'X-Content-Type-Options' => 'nosniff',
|
||||
);
|
||||
drupal_send_headers($default_headers);
|
||||
}
|
||||
@@ -1776,7 +1780,7 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
|
||||
* @see theme_status_messages()
|
||||
*/
|
||||
function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
|
||||
if ($message) {
|
||||
if ($message || $message === '0' || $message === 0) {
|
||||
if (!isset($_SESSION['messages'][$type])) {
|
||||
$_SESSION['messages'][$type] = array();
|
||||
}
|
||||
@@ -2464,6 +2468,9 @@ function _drupal_bootstrap_database() {
|
||||
// the install or upgrade process.
|
||||
spl_autoload_register('drupal_autoload_class');
|
||||
spl_autoload_register('drupal_autoload_interface');
|
||||
if (version_compare(PHP_VERSION, '5.4') >= 0) {
|
||||
spl_autoload_register('drupal_autoload_trait');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2779,10 +2786,14 @@ function language_list($field = 'language') {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default language used on the site
|
||||
* Returns the default language, as an object, or one of its properties.
|
||||
*
|
||||
* @param $property
|
||||
* Optional property of the language object to return
|
||||
* (optional) The property of the language object to return.
|
||||
*
|
||||
* @return
|
||||
* Either the language object for the default language used on the site,
|
||||
* or the property of that object named in the $property parameter.
|
||||
*/
|
||||
function language_default($property = NULL) {
|
||||
$language = variable_get('language_default', (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''));
|
||||
@@ -2952,7 +2963,9 @@ function ip_address() {
|
||||
* Gets the schema definition of a table, or the whole database schema.
|
||||
*
|
||||
* The returned schema will include any modifications made by any
|
||||
* module that implements hook_schema_alter().
|
||||
* module that implements hook_schema_alter(). To get the schema without
|
||||
* modifications, use drupal_get_schema_unprocessed().
|
||||
*
|
||||
*
|
||||
* @param $table
|
||||
* The name of the table. If not given, the schema of all tables is returned.
|
||||
@@ -3107,6 +3120,22 @@ function drupal_autoload_class($class) {
|
||||
return _registry_check_code('class', $class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirms that a trait is available.
|
||||
*
|
||||
* This function is rarely called directly. Instead, it is registered as an
|
||||
* spl_autoload() handler, and PHP calls it for us when necessary.
|
||||
*
|
||||
* @param string $trait
|
||||
* The name of the trait to check or load.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the trait is currently available, FALSE otherwise.
|
||||
*/
|
||||
function drupal_autoload_trait($trait) {
|
||||
return _registry_check_code('trait', $trait);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a resource in the registry.
|
||||
*
|
||||
@@ -3125,7 +3154,7 @@ function drupal_autoload_class($class) {
|
||||
function _registry_check_code($type, $name = NULL) {
|
||||
static $lookup_cache, $cache_update_needed;
|
||||
|
||||
if ($type == 'class' && class_exists($name) || $type == 'interface' && interface_exists($name)) {
|
||||
if ($type == 'class' && class_exists($name) || $type == 'interface' && interface_exists($name) || $type == 'trait' && trait_exists($name)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user