diff --git a/core/authorize.php b/core/authorize.php index dbab02f..76d4c7b 100644 --- a/core/authorize.php +++ b/core/authorize.php @@ -116,10 +116,14 @@ function authorize_access_allowed() { $links += $results['tasks']; } else { - $links = array_merge($links, array( - \Drupal::l(t('Administration pages'), new Url('system.admin')), - \Drupal::l(t('Front page'), new Url('')), - )); + $front_url = Url::fromRoute('') + ->setOption('base_url', $GLOBALS['base_url']); + $admin_url = Url::fromRoute('system.admin') + ->setOption('base_url', $GLOBALS['base_url']); + $links = array_merge($links, [ + ['#markup' => \Drupal::l(t('Administration pages'), $admin_url)], + ['#markup' => \Drupal::l(t('Front page'), $front_url)], + ]); } $content['next_steps'] = array( diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index ecf48cf..6f9cc6b 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -128,7 +128,7 @@ function template_preprocess_authorize_report(&$variables) { $class = 'authorize-results__' . ($log_message['success'] ? 'success' : 'failure'); $items[] = [ '#wrapper_attributes' => ['class' => [$class]], - '#markup' => $message, + '#markup' => $log_message['message'], ]; } $variables['report'][] = [ diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index 805c9a9..04619a2 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -424,6 +424,13 @@ protected function processExtension(&$cache, $name, $type, $theme, $path) { $result[$hook]['includes'] = $cache[$hook]['includes']; } + // Load the includes, as they may contain preprocess functions. + if (isset($info['includes'])) { + foreach ($info['includes'] as $include_file) { + include_once $this->root . '/' . $include_file; + } + } + // If the theme implementation defines a file, then also use the path // that it defined. Otherwise use the default path. This allows // system.module to declare theme functions on behalf of core .include diff --git a/core/lib/Drupal/Core/Updater/Module.php b/core/lib/Drupal/Core/Updater/Module.php index 06e1c1e..9e6c396 100644 --- a/core/lib/Drupal/Core/Updater/Module.php +++ b/core/lib/Drupal/Core/Updater/Module.php @@ -99,11 +99,17 @@ public function getSchemaUpdates() { * Overrides Drupal\Core\Updater\Updater::postInstallTasks(). */ public function postInstallTasks() { - return array( - \Drupal::l(t('Install another module'), new Url('update.module_install')), - \Drupal::l(t('Enable newly added modules'), new Url('system.modules_list')), - \Drupal::l(t('Administration pages'), new Url('system.admin')), - ); + $admin_url = Url::fromRoute('system.admin') + ->setOption('base_url', $GLOBALS['base_url']); + $list_url = Url::fromRoute('system.modules_list') + ->setOption('base_url', $GLOBALS['base_url']); + $install_url = Url::fromRoute('update.module_install') + ->setOption('base_url', $GLOBALS['base_url']); + return [ + ['#markup' => \Drupal::l(t('Install another module'), $install_url)], + ['#markup' => \Drupal::l(t('Enable newly added modules'), $list_url)], + ['#markup' => \Drupal::l(t('Administration pages'), $admin_url)], + ]; } /** diff --git a/core/lib/Drupal/Core/Updater/Theme.php b/core/lib/Drupal/Core/Updater/Theme.php index b379325..5d38475 100644 --- a/core/lib/Drupal/Core/Updater/Theme.php +++ b/core/lib/Drupal/Core/Updater/Theme.php @@ -83,9 +83,13 @@ public function postInstall() { * Overrides Drupal\Core\Updater\Updater::postInstallTasks(). */ public function postInstallTasks() { - return array( - \Drupal::l(t('Install newly added themes'), new Url('system.themes_page')), - \Drupal::l(t('Administration pages'), new Url('system.admin')), - ); + $theme_page_url = Url::fromRoute('system.themes_page') + ->setOption('base_url', $GLOBALS['base_url']); + $admin_url = Url::fromRoute('system.admin') + ->setOption('base_url', $GLOBALS['base_url']); + return [ + ['#markup' => \Drupal::l(t('Install newly added themes'), $theme_page_url)], + ['#markup' => \Drupal::l(t('Administration pages'), $admin_url)], + ]; } }