Unverified Commit 1015c1b3 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3279640 by alexpott, Spokje, mherchel, lauriii, catch: Standard install...

Issue #3279640 by alexpott, Spokje, mherchel, lauriii, catch: Standard install profile uses Olivero for update.php
parent 1b9a758b
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Drupal\system\Theme;

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Extension\ThemeHandlerInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Site\Settings;
use Drupal\Core\Theme\ThemeNegotiatorInterface;
@@ -19,14 +20,28 @@ class DbUpdateNegotiator implements ThemeNegotiatorInterface {
   */
  protected $configFactory;

  /**
   * The theme handler.
   *
   * @var \Drupal\Core\Extension\ThemeHandlerInterface
   */
  protected $themeHandler;

  /**
   * Constructs a DbUpdateNegotiator.
   *
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   The config factory.
   * @param \Drupal\Core\Extension\ThemeHandlerInterface|null $theme_handler
   *   The theme handler.
   */
  public function __construct(ConfigFactoryInterface $config_factory) {
  public function __construct(ConfigFactoryInterface $config_factory, ThemeHandlerInterface $theme_handler = NULL) {
    $this->configFactory = $config_factory;
    if ($theme_handler === NULL) {
      @trigger_error('Calling ' . __METHOD__ . '() without the $theme_handler argument is deprecated in drupal:9.4.0 and $theme_handler argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3279699', E_USER_DEPRECATED);
      $theme_handler = \Drupal::service('theme_handler');
    }
    $this->themeHandler = $theme_handler;
  }

  /**
@@ -40,10 +55,9 @@ public function applies(RouteMatchInterface $route_match) {
   * {@inheritdoc}
   */
  public function determineActiveTheme(RouteMatchInterface $route_match) {
    $custom_theme = Settings::get('maintenance_theme', 'seven');
    $custom_theme = Settings::get('maintenance_theme');
    if (!$custom_theme) {
      $config = $this->configFactory->get('system.theme');
      $custom_theme = $config->get('default');
      $custom_theme = $this->themeHandler->themeExists('claro') ? 'claro' : 'seven';
    }

    return $custom_theme;
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ services:
      - { name: theme_negotiator, priority: 1000 }
  theme.negotiator.system.db_update:
    class: Drupal\system\Theme\DbUpdateNegotiator
    arguments: ['@config.factory']
    arguments: ['@config.factory', '@theme_handler']
    tags:
      - { name: theme_negotiator, priority: 100 }
  system.config_subscriber:
+17 −0
Original line number Diff line number Diff line
@@ -15,6 +15,10 @@
  background-color: #dedfe4;
}

.title {
  margin-top: 0;
}

.site-name {
  margin-top: 1rem;
  word-wrap: break-word;
@@ -179,6 +183,19 @@
  [dir="rtl"] .layout-sidebar-first {
    float: right;
  }
  /* Positioning sidebar & content */
  main {
    float: left; /* LTR */
    clear: none;
    box-sizing: border-box;
    width: 65%;
    padding-left: 3.85em; /* LTR */
  }
  [dir="rtl"] main {
    float: right;
    padding-right: 3.85em;
    padding-left: 0;
  }
}

/**
+17 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@
  background-color: var(--color-gray-100);
}

.title {
  margin-top: 0;
}

.site-name {
  margin-top: var(--space-m);
  word-wrap: break-word;
@@ -171,6 +175,19 @@
  [dir="rtl"] .layout-sidebar-first {
    float: right;
  }
  /* Positioning sidebar & content */
  main {
    float: left; /* LTR */
    clear: none;
    box-sizing: border-box;
    width: 65%;
    padding-left: 3.85em; /* LTR */
  }
  [dir="rtl"] main {
    float: right;
    padding-right: 3.85em;
    padding-left: 0;
  }
}

/**