diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install index be6f8b2..515e38f 100644 --- a/core/modules/shortcut/shortcut.install +++ b/core/modules/shortcut/shortcut.install @@ -12,7 +12,6 @@ * Implements hook_schema(). */ function shortcut_schema() { - $schema['shortcut_set_users'] = array( 'description' => 'Maps users to shortcut sets.', 'fields' => array( @@ -49,3 +48,25 @@ function shortcut_schema() { return $schema; } + +/** + * Implements hook_install(). + */ +function shortcut_install() { + // Themes settings are not configuration entities and cannot depend on modules + // so to set a module specific setting, we need to set it with logic. + if (\Drupal::service('theme_handler')->themeExists('seven')) { + \Drupal::config('seven.settings')->set('third_party_settings.shortcut.module_link', TRUE)->save(); + } +} + +/** + * Implements hook_uninstall(). + */ +function shortcut_uninstall() { + // Themes settings are not configuration entities and cannot depend on modules + // so to unset a module specific setting, we need to unset it with logic. + if (\Drupal::service('theme_handler')->themeExists('seven')) { + \Drupal::config('seven.settings')->clear('third_party_settings.shortcut.module_link')->save(); + } +} diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index 44649d2..e855403 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -390,19 +390,19 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // and use it in place of the default theme-provided file. if ($this->moduleHandler->moduleExists('file')) { if ($file = $values['logo_upload']) { - unset($values['logo_upload']); $filename = file_unmanaged_copy($file->getFileUri()); $values['default_logo'] = 0; $values['logo_path'] = $filename; $values['toggle_logo'] = 1; } if ($file = $values['favicon_upload']) { - unset($values['favicon_upload']); $filename = file_unmanaged_copy($file->getFileUri()); $values['default_favicon'] = 0; $values['favicon_path'] = $filename; $values['toggle_favicon'] = 1; } + unset($values['logo_upload']); + unset($values['favicon_upload']); // If the user entered a path relative to the system files directory for // a logo or favicon, store a public:// URI so the theme system can handle it. diff --git a/core/modules/system/src/Tests/Batch/PageTest.php b/core/modules/system/src/Tests/Batch/PageTest.php index 42800b7..c4b1b70 100644 --- a/core/modules/system/src/Tests/Batch/PageTest.php +++ b/core/modules/system/src/Tests/Batch/PageTest.php @@ -17,6 +17,15 @@ class PageTest extends WebTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/system/src/Tests/Entity/EntityViewControllerTest.php b/core/modules/system/src/Tests/Entity/EntityViewControllerTest.php index aa2d800..93f75df 100644 --- a/core/modules/system/src/Tests/Entity/EntityViewControllerTest.php +++ b/core/modules/system/src/Tests/Entity/EntityViewControllerTest.php @@ -17,6 +17,15 @@ class EntityViewControllerTest extends WebTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php index 50d299c..36c17d9 100644 --- a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php @@ -19,6 +19,15 @@ class ThemeHandlerTest extends KernelTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/system/src/Tests/Form/FormObjectTest.php b/core/modules/system/src/Tests/Form/FormObjectTest.php index 237d9e7..c41928a 100644 --- a/core/modules/system/src/Tests/Form/FormObjectTest.php +++ b/core/modules/system/src/Tests/Form/FormObjectTest.php @@ -18,6 +18,15 @@ class FormObjectTest extends SystemConfigFormTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/system/src/Tests/Menu/BreadcrumbTest.php b/core/modules/system/src/Tests/Menu/BreadcrumbTest.php index ee54f31..22a2f7d 100644 --- a/core/modules/system/src/Tests/Menu/BreadcrumbTest.php +++ b/core/modules/system/src/Tests/Menu/BreadcrumbTest.php @@ -19,6 +19,15 @@ class BreadcrumbTest extends MenuTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array @@ -41,7 +50,6 @@ protected function setUp() { // presence on the page, so we need to ensure that the Tools block will be // displayed in the admin theme. $this->drupalPlaceBlock('system_menu_block:tools', array( - 'machine' => 'system_menu_tools', 'region' => 'content', 'theme' => \Drupal::config('system.theme')->get('admin'), )); diff --git a/core/modules/system/src/Tests/Menu/MenuRouterTest.php b/core/modules/system/src/Tests/Menu/MenuRouterTest.php index 7de9006..4dd2e19 100644 --- a/core/modules/system/src/Tests/Menu/MenuRouterTest.php +++ b/core/modules/system/src/Tests/Menu/MenuRouterTest.php @@ -17,6 +17,15 @@ class MenuRouterTest extends WebTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/system/src/Tests/System/PageTitleTest.php b/core/modules/system/src/Tests/System/PageTitleTest.php index 98148cd..31020c9 100644 --- a/core/modules/system/src/Tests/System/PageTitleTest.php +++ b/core/modules/system/src/Tests/System/PageTitleTest.php @@ -20,6 +20,15 @@ class PageTitleTest extends WebTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index 80d469a..8a7fd04 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -19,6 +19,15 @@ class ThemeTest extends WebTestBase { /** + * Set to TRUE to strict check all configuration saved. + * + * @see \Drupal\Core\Config\Testing\ConfigSchemaChecker + * + * @var bool + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/themes/seven/config/install/seven.settings.yml b/core/themes/seven/config/install/seven.settings.yml deleted file mode 100644 index 6bba58b..0000000 --- a/core/themes/seven/config/install/seven.settings.yml +++ /dev/null @@ -1,3 +0,0 @@ -third_party_settings: - shortcut: - module_link: true diff --git a/core/themes/seven/seven.install b/core/themes/seven/seven.install new file mode 100644 index 0000000..43faf47b --- /dev/null +++ b/core/themes/seven/seven.install @@ -0,0 +1,17 @@ +moduleExists('shortcut')) { + \Drupal::config('seven.settings')->set('third_party_settings.shortcut.module_link', TRUE)->save(); + } +}