diff --git a/core/modules/field/lib/Drupal/field/Tests/TranslationTest.php b/core/modules/field/lib/Drupal/field/Tests/TranslationTest.php index 24b7063..ee338a3 100644 --- a/core/modules/field/lib/Drupal/field/Tests/TranslationTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/TranslationTest.php @@ -36,7 +36,6 @@ public static function getInfo() { function setUp() { parent::setUp(); - $this->installSchema('language', array('language')); $this->installSchema('node', array('node_type')); $this->field_name = drupal_strtolower($this->randomName() . '_field_name'); diff --git a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php index b40bffa..a24ddb4 100644 --- a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php +++ b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php @@ -60,7 +60,6 @@ function setUp() { parent::setUp(); $this->installSchema('system', array('variable', 'url_alias')); $this->installSchema('user', array('users')); - $this->installSchema('language', array('language')); $this->installSchema('entity_test', array('entity_test')); $this->installConfig(array('field')); diff --git a/core/modules/language/language.install b/core/modules/language/language.install index 63a20e0..90f8b86 100644 --- a/core/modules/language/language.install +++ b/core/modules/language/language.install @@ -83,7 +83,7 @@ function language_update_8000() { foreach ($result as $language) { config('language.entity.' . $language->langcode) - ->set('id', $language->langcode) + ->set('langcode', $language->langcode) ->set('name', $language->name) ->set('direction', $language->direction) ->set('weight', $language->weight) diff --git a/core/modules/language/language.views.inc b/core/modules/language/language.views.inc deleted file mode 100644 index 2ec7e3a..0000000 --- a/core/modules/language/language.views.inc +++ /dev/null @@ -1,108 +0,0 @@ - 'langcode', - 'title' => t('Language'), - 'help' => t('A language used in drupal.'), - ); - - $data['language']['langcode'] = array( - 'title' => t('Language code'), - 'help' => t("Language code, e.g. 'de' or 'en-US'."), - 'field' => array( - 'id' => 'standard', - ), - 'filter' => array( - 'id' => 'string' - ), - 'argument' => array( - 'id' => 'string', - ), - 'sort' => array( - 'id' => 'standard', - ), - ); - - $data['language']['name'] = array( - 'title' => t('Language name'), - 'help' => t("Language name, e.g. 'German' or 'English'."), - 'field' => array( - 'id' => 'standard', - ), - 'filter' => array( - 'id' => 'string' - ), - 'argument' => array( - 'id' => 'string', - ), - 'sort' => array( - 'id' => 'standard', - ), - ); - - $data['language']['direction'] = array( - 'title' => t('Direction'), - 'help' => t('Direction of language (Left-to-Right = 0, Right-to-Left = 1).'), - 'field' => array( - 'id' => 'numeric', - ), - 'filter' => array( - 'id' => 'numeric' - ), - 'argument' => array( - 'id' => 'numeric', - ), - 'sort' => array( - 'id' => 'standard', - ), - ); - - $data['language']['weight'] = array( - 'title' => t('Weight'), - 'help' => t('Weight, used in lists of languages.'), - 'field' => array( - 'id' => 'numeric', - ), - 'filter' => array( - 'id' => 'numeric' - ), - 'argument' => array( - 'id' => 'numeric', - ), - 'sort' => array( - 'id' => 'standard', - ), - ); - - $data['language']['locked'] = array( - 'title' => t('Locked'), - 'help' => t('A boolean indicating whether the administrator can edit or delete the language.'), - 'field' => array( - 'id' => 'boolean', - ), - 'filter' => array( - 'id' => 'boolean', - ), - 'argument' => array( - 'id' => 'numeric', - ), - 'sort' => array( - 'id' => 'standard', - ), - ); - - return $data; -} diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php index b2d0bda..8d5f44d 100644 --- a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php +++ b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php @@ -158,7 +158,16 @@ protected function checkConfigurableLanguageWeight($state = 'by default') { * Maximum weight of configurable languages. */ protected function getHighestConfigurableLanguageWeight(){ - return db_query('SELECT MAX(weight) FROM {language} WHERE locked = 0')->fetchField(); + $max_weight = 0; + + $languages = entity_load_multiple('language', NULL, TRUE); + foreach ($languages as $language) { + if (!$language->locked && $language->weight > $max_weight) { + $max_weight = $language->weight; + } + } + + return $max_weight; } } diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php index 78e768c..d81446d 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php @@ -33,7 +33,6 @@ class HandlerAllTest extends HandlerTestBase { 'file', 'forum', 'history', - 'language', 'locale', 'node', 'search',