diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index 56a2658..f54ad6a 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -202,7 +202,7 @@ public function form(array $form, array &$form_state) { // Only show the account setting for Administration pages language to users // if one of the detection and selection methods uses it. - if (Drupal::moduleHandler()->moduleExists('language')) { + if (\Drupal::moduleHandler()->moduleExists('language')) { $show_admin_language = FALSE; if (language_multilingual()) { foreach (language_types_info() as $type_key => $language_type) { diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAdminLanguageTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAdminLanguageTest.php index b674028..c9e21ec 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserAdminLanguageTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserAdminLanguageTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\user\Tests\UserAdminLanguageTest. + * Contains \Drupal\user\Tests\UserAdminLanguageTest. */ namespace Drupal\user\Tests; @@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase; /** - * Functional tests for a user's ability to change their admininstration pages language. + * Tests users' ability to change administration pages language for theirself. */ class UserAdminLanguageTest extends WebTestBase { @@ -38,8 +38,7 @@ protected function setUp() { } /** - * Tests that the admin language configuration is not available if the site - * is not multilingual. + * Tests that admin language is not configurable in single language sites. */ function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage() { $this->drupalLogin($this->admin_user); @@ -51,8 +50,8 @@ function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage() { } /** - * Tests that the admin language configuration is not available if the admin - * language negotiation is not enabled. + * Tests that admin language is configurable only if admin language negotiation + * is enabled. */ function testUserAdminLanguageConfigurationNotAvailableWithoutAdminLanguageNegotiation() { $this->drupalLogin($this->admin_user); @@ -63,8 +62,7 @@ function testUserAdminLanguageConfigurationNotAvailableWithoutAdminLanguageNegot } /** - * Tests that the admin language configuration is available for admins in - * multilingual sites, but not for users without the right permissions. + * Tests that the admin language is configurable only for admins. */ function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegotiationIsEnabled() { $this->drupalLogin($this->admin_user); @@ -84,7 +82,7 @@ function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegotiationIs } /** - * Helper meethod for setting the language user admin negotiation. + * Helper method for setting the language user admin negotiation. */ function setLanguageNegotiation() { $edit = array(