diff --git a/core/includes/path.inc b/core/includes/path.inc index 0635f80..39a59ed 100644 --- a/core/includes/path.inc +++ b/core/includes/path.inc @@ -298,7 +298,13 @@ function drupal_is_front_page() { $is_front_page = &$drupal_static_fast['is_front_page']; if (!isset($is_front_page)) { - $is_front_page = (current_path() == config('system.site')->get('site_frontpage')); + // If we are in the install mode, then always return FALSE. + if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') { + $is_front_page = FALSE; + } + else { + $is_front_page = (current_path() == config('system.site')->get('site_frontpage')); + } } return $is_front_page; diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2223e43..f75b7d3 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2712,18 +2712,26 @@ function template_preprocess_maintenance_page(&$variables) { $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second'; } - $site_config = config('system.site'); + $site_name = ''; + $site_slogan = ''; + // If we are not in the install mode, then load the site_name and site_slogan + // from config. + if (!(defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install')) { + $site_config = config('system.site'); + $site_name = $site_config->get('site_name'); + $site_slogan = $site_config->get('site_slogan'); + } // Construct page title if (drupal_get_title()) { $head_title = array( 'title' => strip_tags(drupal_get_title()), - 'name' => $site_config->get('site_name'), + 'name' => $site_name, ); } else { - $head_title = array('name' => $site_config->get('site_name')); - if ($site_config->get('site_slogan')) { - $head_title['slogan'] = $site_config->get('site_slogan'); + $head_title = array('name' => $site_name); + if ($site_slogan) { + $head_title['slogan'] = $site_slogan; } } @@ -2740,8 +2748,8 @@ function template_preprocess_maintenance_page(&$variables) { $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : ''; $variables['main_menu'] = array(); $variables['secondary_menu'] = array(); - $variables['site_name'] = (theme_get_setting('toggle_name') ? $site_config->get('site_name') : ''); - $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? $site_config->get('site_slogan') : ''); + $variables['site_name'] = (theme_get_setting('toggle_name') ? $site_name : ''); + $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? $site_slogan : ''); $variables['tabs'] = ''; $variables['title'] = drupal_get_title(); diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php index 42cfbcc..c736245 100644 --- a/core/lib/Drupal/Core/Config/DatabaseStorage.php +++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php @@ -20,9 +20,6 @@ class DatabaseStorage extends StorageBase { // handle it if need be. $data = array(); try { - if (!function_exists('db_query')) { - throw new Exception("no db_query"); - } $raw = db_query('SELECT data FROM {config} WHERE name = :name', array(':name' => $this->name))->fetchField(); if ($raw !== FALSE) { $data = $this->decode($raw);