upgrades core to 8.4.2

This commit is contained in:
Bachir Soussi Chiadmi
2017-11-14 16:09:54 +01:00
parent bd60eff9b3
commit c2b4e25be4
3504 changed files with 140306 additions and 38684 deletions
+1 -2
View File
@@ -166,7 +166,7 @@ class ImportForm extends FormBase {
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::moduleHandler()->loadInclude('locale', 'translation.inc');
$this->moduleHandler->loadInclude('locale', 'translation.inc');
// Add language, if not yet supported.
$language = $this->languageManager->getLanguage($form_state->getValue('langcode'));
if (empty($language)) {
@@ -185,7 +185,6 @@ class ImportForm extends FormBase {
batch_set($batch);
// Create or update all configuration translations for this language.
\Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc');
if ($batch = locale_config_batch_update_components($options, [$form_state->getValue('langcode')])) {
batch_set($batch);
}
@@ -140,9 +140,7 @@ class LocaleConfigManager {
if ($this->isSupported($name)) {
// Create typed configuration wrapper based on install storage data.
$data = $this->defaultConfigStorage->read($name);
$type_definition = $this->typedConfigManager->getDefinition($name);
$data_definition = $this->typedConfigManager->buildDataDefinition($type_definition, $data);
$typed_config = $this->typedConfigManager->create($data_definition, $data);
$typed_config = $this->typedConfigManager->createFromNameAndData($name, $data);
if ($typed_config instanceof TraversableTypedDataInterface) {
return $this->getTranslatableData($typed_config);
}
@@ -99,7 +99,7 @@ class LocaleTranslation extends QueueWorkerBase implements ContainerFactoryPlugi
}
else {
$batch_context = $args[$last];
unset ($args[$last]);
unset($args[$last]);
}
$args = array_merge($args, [&$batch_context]);
@@ -3,6 +3,7 @@
namespace Drupal\locale;
use Drupal\Core\Database\Connection;
use Drupal\Core\Database\Query\Condition;
/**
* Defines a class to store localized strings in the database.
@@ -416,7 +417,7 @@ class StringDatabaseStorage implements StringStorageInterface {
elseif ($table_alias == 't' && $join === 'leftJoin') {
// Conditions for target fields when doing an outer join only make
// sense if we add also OR field IS NULL.
$query->condition(db_or()
$query->condition((new Condition('OR'))
->condition($field_alias, (array) $value, 'IN')
->isNull($field_alias)
);
@@ -429,7 +430,7 @@ class StringDatabaseStorage implements StringStorageInterface {
// Process other options, string filter, query limit, etc.
if (!empty($options['filters'])) {
if (count($options['filters']) > 1) {
$filter = db_or();
$filter = new Condition('OR');
$query->condition($filter);
}
else {