Skip to content

Commit

Permalink
Upgraded Drupal to 7.37
Browse files Browse the repository at this point in the history
Former-commit-id: ed9b87b797ae7df157cda5160142ee75f0904677
  • Loading branch information
sdrycroft committed May 7, 2015
1 parent 0a883a2 commit 0021813
Show file tree
Hide file tree
Showing 159 changed files with 9,098 additions and 421 deletions.
9 changes: 4 additions & 5 deletions includes/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* The current system version.
*/
define('VERSION', '7.36');
define('VERSION', '7.37');

/**
* Core API compatibility.
Expand Down Expand Up @@ -2550,10 +2550,9 @@ function drupal_valid_test_ua() {
// The file properties add more entropy not easily accessible to others.
$key = drupal_get_hash_salt() . filectime(__FILE__) . fileinode(__FILE__);
$time_diff = REQUEST_TIME - $time;
// Since we are making a local request a 5 seconds time window is allowed,
// and the HMAC must match. However, for selenium it's usually not enough to
// pull-up a browser window and render a page, so we set 500 seconds window.
if ($time_diff >= 0 && $time_diff <= 500 && $hmac == drupal_hmac_base64($check_string, $key)) {
// Since we are making a local request a 5 second time window is allowed,
// and the HMAC must match.
if ($time_diff >= 0 && $time_diff <= 5 && $hmac == drupal_hmac_base64($check_string, $key)) {
$test_prefix = $prefix;
return $test_prefix;
}
Expand Down
22 changes: 20 additions & 2 deletions includes/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ function _filter_xss_split($m, $store = FALSE) {
return '&lt;';
}

if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
// Seriously malformed.
return '';
}
Expand Down Expand Up @@ -3802,7 +3802,7 @@ function drupal_load_stylesheet_content($contents, $optimize = FALSE) {

// Replaces @import commands with the actual stylesheet content.
// This happens recursively but omits external files.
$contents = preg_replace_callback('/@import\s*(?:url\(\s*)?[\'"]?(?![a-z]+:)([^\'"\()]+)[\'"]?\s*\)?\s*;/', '_drupal_load_stylesheet', $contents);
$contents = preg_replace_callback('/@import\s*(?:url\(\s*)?[\'"]?(?![a-z]+:)(?!\/\/)([^\'"\()]+)[\'"]?\s*\)?\s*;/', '_drupal_load_stylesheet', $contents);
return $contents;
}

Expand Down Expand Up @@ -7137,6 +7137,23 @@ function _drupal_schema_initialize(&$schema, $module, $remove_descriptions = TRU
}
}

/**
* Retrieves the type for every field in a table schema.
*
* @param $table
* The name of the table from which to retrieve type information.
*
* @return
* An array of types, keyed by field name.
*/
function drupal_schema_field_types($table) {
$table_schema = drupal_get_schema($table);
foreach ($table_schema['fields'] as $field_name => $field_info) {
$field_types[$field_name] = isset($field_info['type']) ? $field_info['type'] : NULL;
}
return $field_types;
}

/**
* Retrieves a list of fields from a table schema.
*
Expand Down Expand Up @@ -7764,6 +7781,7 @@ function entity_get_info($entity_type = NULL, $reset = FALSE) {
// Prepare entity schema fields SQL info for
// DrupalEntityControllerInterface::buildQuery().
if (isset($entity_info[$name]['base table'])) {
$entity_info[$name]['base table field types'] = drupal_schema_field_types($entity_info[$name]['base table']);
$entity_info[$name]['schema_fields_sql']['base table'] = drupal_schema_fields_sql($entity_info[$name]['base table']);
if (isset($entity_info[$name]['revision table'])) {
$entity_info[$name]['schema_fields_sql']['revision table'] = drupal_schema_fields_sql($entity_info[$name]['revision table']);
Expand Down
Loading

0 comments on commit 0021813

Please sign in to comment.