diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index fd8b777..cec10ad 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -290,7 +290,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme = $local_file = \Drupal::theme()->getActiveTheme()->getPath() . '/' . $default; } - $element['#description'] = t('Examples: @implicit-public-file (for a file in the public filesystem), @explicit-file, or @local-file.', array( + $element['#description'] = t('Examples: @local-file (for a file in the document root) or @explicit-file for a file in the public files directory.', array( '@implicit-public-file' => isset($friendly_path) ? $friendly_path : $default, '@explicit-file' => file_uri_scheme($original_path) !== FALSE ? $original_path : 'public://' . $default, '@local-file' => $local_file, @@ -364,7 +364,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { if ($this->moduleHandler->moduleExists('file')) { // Handle file uploads. - $validators = array('file_validate_is_image' => array()); + $validators = array('file_validate_extensions' => array('png gif jpg jpeg apng svg')); // Check for a new uploaded logo. $file = file_save_upload('logo_upload', $validators, FALSE, 0); diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index d5bb6f6..edc2861 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -118,9 +118,8 @@ function testThemeSettings() { $explicit_file = 'public://' . $input; $local_file = PublicStream::basePath() . '/' . $input; } - $this->assertEqual((string) $elements[0], $implicit_public_file); + $this->assertEqual((string) $elements[0], $local_file); $this->assertEqual((string) $elements[1], $explicit_file); - $this->assertEqual((string) $elements[2], $local_file); // Verify the actual 'src' attribute of the logo being output. $this->drupalGet('');