updated core

This commit is contained in:
Bachir Soussi Chiadmi
2018-01-24 13:36:32 +01:00
parent cd7dea45a9
commit f9374cf96d
1997 changed files with 5175 additions and 127715 deletions
+23 -8
View File
@@ -148,12 +148,13 @@ const LOCALE_PLURAL_DELIMITER = PluralTranslatableMarkup::DELIMITER;
* If the query parameter isn't present, then the URL of the current
* request is returned.
*
* @see \Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrl()
*
* @ingroup form_api
*
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use the redirect.destination service.
*
* @see \Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrl()
* @see https://www.drupal.org/node/2448603
*/
function drupal_get_destination() {
return \Drupal::destination()->getAsArray();
@@ -176,6 +177,8 @@ function drupal_get_destination() {
*
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal::service('email.validator')->isValid().
*
* @see https://www.drupal.org/node/2912661
*/
function valid_email_address($mail) {
return \Drupal::service('email.validator')->isValid($mail);
@@ -209,9 +212,6 @@ function valid_email_address($mail) {
* Drupal\Core\Template\Attribute, call
* \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() instead.
*
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Component\Utility\UrlHelper::filterBadProtocol()
*
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol()
* instead. UrlHelper::stripDangerousProtocols() can be used in conjunction
@@ -220,6 +220,10 @@ 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.
*
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Component\Utility\UrlHelper::filterBadProtocol()
* @see https://www.drupal.org/node/2560027
*/
function check_url($uri) {
return Html::escape(UrlHelper::stripDangerousProtocols($uri));
@@ -315,10 +319,11 @@ function format_size($size, $langcode = NULL) {
* @return
* A translated date string in the requested format.
*
* @see \Drupal\Core\Datetime\DateFormatter::format()
*
* @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
* Use \Drupal::service('date.formatter')->format().
*
* @see \Drupal\Core\Datetime\DateFormatter::format()
* @see https://www.drupal.org/node/1876852
*/
function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) {
return \Drupal::service('date.formatter')->format($timestamp, $type, $format, $timezone, $langcode);
@@ -420,6 +425,8 @@ function base_path() {
*
* @deprecated in Drupal 8.x, will be removed before Drupal 9.0.
* Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll().
*
* @see https://www.drupal.org/node/2317841
*/
function drupal_clear_css_cache() {
\Drupal::service('asset.css.collection_optimizer')->deleteAll();
@@ -737,6 +744,8 @@ function drupal_attach_tabledrag(&$element, array $options) {
*
* @deprecated in Drupal 8.x, will be removed before Drupal 9.0.
* Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll().
*
* @see https://www.drupal.org/node/2317841
*/
function drupal_clear_js_cache() {
\Drupal::service('asset.js.collection_optimizer')->deleteAll();
@@ -854,6 +863,7 @@ function drupal_pre_render_links($element) {
* 'renderer' service instead.
*
* @see \Drupal\Core\Render\RendererInterface::renderRoot()
* @see https://www.drupal.org/node/2912696
*/
function drupal_render_root(&$elements) {
return \Drupal::service('renderer')->renderRoot($elements);
@@ -866,6 +876,7 @@ function drupal_render_root(&$elements) {
* 'renderer' service instead.
*
* @see \Drupal\Core\Render\RendererInterface::render()
* @see https://www.drupal.org/node/2912696
*/
function drupal_render(&$elements, $is_recursive_call = FALSE) {
return \Drupal::service('renderer')->render($elements, $is_recursive_call);
@@ -889,6 +900,7 @@ function drupal_render(&$elements, $is_recursive_call = FALSE) {
* they are available.
*
* @see drupal_render()
* @see https://www.drupal.org/node/2912757
*/
function drupal_render_children(&$element, $children_keys = NULL) {
if ($children_keys === NULL) {
@@ -1002,6 +1014,8 @@ function show(&$element) {
*
* @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
* Use \Drupal::service('element_info')->getInfo() instead.
*
* @see https://www.drupal.org/node/2235461
*/
function element_info($type) {
return \Drupal::service('element_info')->getInfo($type);
@@ -1020,6 +1034,8 @@ function element_info($type) {
*
* @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
* Use \Drupal::service('element_info')->getInfoProperty() instead.
*
* @see https://www.drupal.org/node/2235461
*/
function element_info_property($type, $property_name, $default = NULL) {
return \Drupal::service('element_info')->getInfoProperty($type, $property_name, $default);
@@ -1112,7 +1128,6 @@ function drupal_flush_all_caches() {
// to reset the theme manager.
\Drupal::theme()->resetActiveTheme();
// Rebuild and reboot a new kernel. A simple DrupalKernel reboot is not
// sufficient, since the list of enabled modules might have been adjusted
// above due to changed code.
-1
View File
@@ -526,7 +526,6 @@ function file_unmanaged_prepare($source, &$destination = NULL, $replace = FILE_E
$destination = file_build_uri(drupal_basename($source));
}
// Prepare the destination directory.
if (file_prepare_directory($destination)) {
// The destination is already a directory, so append the source basename.
+1
View File
@@ -415,6 +415,7 @@ function install_begin_request($class_loader, &$install_state) {
else {
$environment = 'prod';
}
$GLOBALS['conf']['container_service_providers']['InstallerConfigOverride'] = 'Drupal\Core\Installer\ConfigOverride';
// Only allow dumping the container once the hash salt has been created.
$kernel = InstallerKernel::createFromRequest($request, $class_loader, $environment, (bool) Settings::get('hash_salt', FALSE));
+1 -1
View File
@@ -461,7 +461,7 @@ function theme_render_and_autoescape($arg) {
*
* @param array $theme_settings
* An array of theme settings from system setting form or a Drupal 7 variable.
* @param Config $config
* @param \Drupal\Core\Config\Config $config
* The configuration object to update.
*
* @return
+1 -1
View File
@@ -83,7 +83,7 @@ function update_system_schema_requirements() {
$requirements['minimum schema'] += [
'value' => 'The installed schema version does not meet the minimum.',
'severity' => REQUIREMENT_ERROR,
'description' => 'Your system schema version is ' . $system_schema . '. Updating directly from a schema version prior to 8000 is not supported. You must <a href="https://www.drupal.org/node/2179269">migrate your site to Drupal 8</a> first.',
'description' => 'Your system schema version is ' . $system_schema . '. Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 first, see https://www.drupal.org/docs/8/upgrade.',
];
}