Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2

This commit is contained in:
Pantheon Automation 2016-06-02 15:56:09 -07:00 committed by Greg Anderson
parent 9eae24d844
commit 28556d630e
1322 changed files with 6699 additions and 2064 deletions

View file

@ -220,7 +220,6 @@ function valid_email_address($mail) {
* UrlHelper::filterBadProtocol() is functionality equivalent to check_url()
* apart from the fact it is protected from double escaping bugs. Note that
* this method no longer marks its output as safe.
*
*/
function check_url($uri) {
return Html::escape(UrlHelper::stripDangerousProtocols($uri));

View file

@ -181,7 +181,7 @@ function _drupal_log_error($error, $fatal = FALSE) {
if ($fatal) {
// When called from CLI, simply output a plain text message.
// Should not translate the string to avoid errors producing more errors.
$response->setContent(html_entity_decode(strip_tags(SafeMarkup::format('%type: @message in %function (line %line of %file).', $error))). "\n");
$response->setContent(html_entity_decode(strip_tags(SafeMarkup::format('%type: @message in %function (line %line of %file).', $error))) . "\n");
$response->send();
exit;
}

View file

@ -33,23 +33,6 @@ const FILE_CHMOD_FILE = FileSystem::CHMOD_FILE;
* @defgroup file File interface
* @{
* Common file handling functions.
*
* Fields on the file entity:
* - fid: File ID
* - uid: The {users}.uid of the user who is associated with the file.
* - filename: Name of the file with no path components. This may differ from
* the basename of the filepath if the file is renamed to avoid overwriting
* an existing file.
* - uri: URI of the file.
* - filemime: The file's MIME type.
* - filesize: The size of the file in bytes.
* - status: A bitmapped field indicating the status of the file. The first 8
* bits are reserved for Drupal core. The least significant bit indicates
* temporary (0) or permanent (1). Temporary files will be removed during
* cron runs if they are older than the configuration value
* "system.file.temporary_maximum_age", and if clean-up is enabled. Permanent
* files will not be removed.
* - timestamp: UNIX timestamp for the date the file was added to the database.
*/
/**

View file

@ -313,7 +313,6 @@ function template_preprocess_checkboxes(&$variables) {
* An associative array containing:
* - element: An associative array containing the properties and children of
* the details element. Properties used: #children.
*
*/
function template_preprocess_vertical_tabs(&$variables) {
$element = $variables['element'];
@ -372,7 +371,6 @@ function template_preprocess_form(&$variables) {
* - element: An associative array containing the properties of the element.
* Properties used: #title, #value, #description, #rows, #cols,
* #placeholder, #required, #attributes, #resizable
*
*/
function template_preprocess_textarea(&$variables) {
$element = $variables['element'];

View file

@ -1372,7 +1372,7 @@ function install_retrieve_file($uri, $destination) {
}
/**
* Checks if the localization server can be contacted.
* Checks if the localization server can be contacted.
*
* @param string $uri
* The URI to contact.
@ -1595,7 +1595,7 @@ function install_download_additional_translations_operations(&$install_state) {
// should download/import translations.
$languages = \Drupal::languageManager()->getLanguages();
$operations = array();
foreach($languages as $langcode => $language) {
foreach ($languages as $langcode => $language) {
// The installer language was already downloaded. Check downloads for the
// other languages if any. Ignore any download errors here, since we
// are in the middle of an install process and there is no way back. We

View file

@ -227,7 +227,7 @@ function drupal_rewrite_settings($settings = array(), $settings_file = NULL) {
else {
_drupal_rewrite_settings_global($settings_settings, $data);
}
$variable_names['$'. $setting] = $setting;
$variable_names['$' . $setting] = $setting;
}
$contents = file_get_contents($settings_file);
if ($contents !== FALSE) {
@ -362,13 +362,14 @@ function drupal_rewrite_settings($settings = array(), $settings_file = NULL) {
* Checks whether this token represents a scalar or NULL.
*
* @param int $type
* The token type
* @see token_name().
* The token type.
* @param string $value
* The value of the token.
*
* @return bool
* TRUE if this token represents a scalar or NULL.
*
* @see token_name()
*/
function _drupal_rewrite_settings_is_simple($type, $value) {
$is_integer = $type == T_LNUMBER;
@ -386,11 +387,12 @@ function _drupal_rewrite_settings_is_simple($type, $value) {
* string.
*
* @param int $type
* The token type
* @see token_name().
* The token type.
*
* @return bool
* TRUE if this token represents a number or a string.
*
* @see token_name()
*/
function _drupal_rewrite_settings_is_array_index($type) {
$is_integer = $type == T_LNUMBER;
@ -515,7 +517,7 @@ function drupal_install_config_directories() {
// they can later be added to git. Since this directory is auto-created, we
// have to write out the README rather than just adding it to the drupal core
// repo.
$text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.' .' For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config';
$text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.' . ' For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config';
file_put_contents(config_get_config_directory(CONFIG_SYNC_DIRECTORY) . '/README.txt', $text);
}

View file

@ -13,8 +13,11 @@ use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\Html;
use Drupal\Component\Render\MarkupInterface;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Cache\CacheableDependencyInterface;
use Drupal\Core\Config\Config;
use Drupal\Core\Config\StorageException;
use Drupal\Core\Render\AttachmentsInterface;
use Drupal\Core\Render\BubbleableMetadata;
use Drupal\Core\Render\RenderableInterface;
use Drupal\Core\Template\Attribute;
use Drupal\Core\Theme\ThemeSettings;
@ -399,6 +402,17 @@ function theme_get_setting($setting_name, $theme = NULL) {
* https://www.drupal.org/node/2575065
*/
function theme_render_and_autoescape($arg) {
// If it's a renderable, then it'll be up to the generated render array it
// returns to contain the necessary cacheability & attachment metadata. If
// it doesn't implement CacheableDependencyInterface or AttachmentsInterface
// then there is nothing to do here.
if (!($arg instanceof RenderableInterface) && ($arg instanceof CacheableDependencyInterface || $arg instanceof AttachmentsInterface)) {
$arg_bubbleable = [];
BubbleableMetadata::createFromObject($arg)
->applyTo($arg_bubbleable);
\Drupal::service('renderer')->render($arg_bubbleable);
}
if ($arg instanceof MarkupInterface) {
return (string) $arg;
}
@ -582,7 +596,7 @@ function template_preprocess_datetime_wrapper(&$variables) {
*
* Unfortunately links templates duplicate the "active" class handling of l()
* and LinkGenerator::generate() because it needs to be able to set the "active"
* class not on the links themselves ("a" tags), but on the list items ("li"
* class not on the links themselves (<a> tags), but on the list items (<li>
* tags) that contain the links. This is necessary for CSS to be able to style
* list items differently when the link is active, since CSS does not yet allow
* one to style list items only if it contains a certain element with a certain
@ -642,7 +656,7 @@ function template_preprocess_links(&$variables) {
if (!empty($links)) {
// Prepend the heading to the list, if any.
if (!empty($heading)) {
// Convert a string heading into an array, using a H2 tag by default.
// Convert a string heading into an array, using a <h2> tag by default.
if (is_string($heading)) {
$heading = array('text' => $heading);
}
@ -844,28 +858,28 @@ function template_preprocess_image(&$variables) {
* - colgroups: An array of column groups. Each element of the array can be
* either:
* - An array of columns, each of which is an associative array of HTML
* attributes applied to the COL element.
* - An array of attributes applied to the COLGROUP element, which must
* include a "data" attribute. To add attributes to COL elements, set the
* "data" attribute with an array of columns, each of which is an
* attributes applied to the <col> element.
* - An array of attributes applied to the <colgroup> element, which must
* include a "data" attribute. To add attributes to <col> elements,
* set the "data" attribute with an array of columns, each of which is an
* associative array of HTML attributes.
* Here's an example for $colgroup:
* @code
* $colgroup = array(
* // COLGROUP with one COL element.
* // <colgroup> with one <col> element.
* array(
* array(
* 'class' => array('funky'), // Attribute for the COL element.
* 'class' => array('funky'), // Attribute for the <col> element.
* ),
* ),
* // Colgroup with attributes and inner COL elements.
* // <colgroup> with attributes and inner <col> elements.
* array(
* 'data' => array(
* array(
* 'class' => array('funky'), // Attribute for the COL element.
* 'class' => array('funky'), // Attribute for the <col> element.
* ),
* ),
* 'class' => array('jazzy'), // Attribute for the COLGROUP element.
* 'class' => array('jazzy'), // Attribute for the <colgroup> element.
* ),
* );
* @endcode
@ -1143,7 +1157,7 @@ function template_preprocess_container(&$variables) {
* An associative array containing:
* - items: An associative array of maintenance tasks.
* It's the caller's responsibility to ensure this array's items contain no
* dangerous HTML such as SCRIPT tags.
* dangerous HTML such as <script> tags.
* - active: The key for the currently active maintenance task.
*/
function template_preprocess_maintenance_task_list(&$variables) {
@ -1253,7 +1267,7 @@ function template_preprocess_html(&$variables) {
$variables['html_attributes'] = new Attribute();
// HTML element attributes.
// <html> element attributes.
$language_interface = \Drupal::languageManager()->getCurrentLanguage();
$variables['html_attributes']['lang'] = $language_interface->getId();
$variables['html_attributes']['dir'] = $language_interface->getDirection();

View file

@ -326,7 +326,7 @@ function update_get_update_list() {
$updates = array_combine($updates, $updates);
foreach (array_keys($updates) as $update) {
if ($update == \Drupal::CORE_MINIMUM_SCHEMA_VERSION) {
$ret[$module]['warning'] = '<em>' . $module . '</em> module cannot be updated. It contains an update numbered as ' . \Drupal::CORE_MINIMUM_SCHEMA_VERSION . ' which is reserved for the earliest installation of a module in Drupal ' . \Drupal::CORE_COMPATIBILITY . ', before any updates. In order to update <em>' . $module . '</em> module, you will need to install a version of the module with valid updates.';
$ret[$module]['warning'] = '<em>' . $module . '</em> module cannot be updated. It contains an update numbered as ' . \Drupal::CORE_MINIMUM_SCHEMA_VERSION . ' which is reserved for the earliest installation of a module in Drupal ' . \Drupal::CORE_COMPATIBILITY . ', before any updates. In order to update <em>' . $module . '</em> module, you will need to install a version of the module with valid updates.';
continue 2;
}
if ($update > $schema_version) {