diff -u b/core/includes/mail.inc b/core/includes/mail.inc --- b/core/includes/mail.inc +++ b/core/includes/mail.inc @@ -119,7 +119,10 @@ */ function drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE) { $site_mail = config('system.site')->get('mail'); - $default_from = (!empty($site_mail) ? $site_mail : ini_get('sendmail_from')); + if (empty($site_mail)) { + $site_mail = ini_get('sendmail_from'); + } + $default_from = $site_mail; // Bundle up the variables into a structured array for altering. $message = array( diff -u b/core/includes/path.inc b/core/includes/path.inc --- b/core/includes/path.inc +++ b/core/includes/path.inc @@ -298,7 +298,13 @@ $is_front_page = &$drupal_static_fast['is_front_page']; if (!isset($is_front_page)) { - $is_front_page = (current_path() == config('system.site')->get('page.front')); + // 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('page.front')); + } } return $is_front_page; diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2747,18 +2747,26 @@ $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('name'); + $site_slogan = $site_config->get('slogan'); + } // Construct page title if (drupal_get_title()) { $head_title = array( 'title' => strip_tags(drupal_get_title()), - 'name' => $site_config->get('name'), + 'name' => $site_name, ); } else { - $head_title = array('name' => $site_config->get('name')); - if ($site_config->get('slogan')) { - $head_title['slogan'] = $site_config->get('slogan'); + $head_title = array('name' => $site_name); + if ($site_slogan) { + $head_title['slogan'] = $site_slogan; } } @@ -2775,8 +2783,8 @@ $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('name') : ''); - $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? $site_config->get('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 -u b/core/modules/node/node.module b/core/modules/node/node.module --- b/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -2541,7 +2541,7 @@ ->orderBy('sticky', 'DESC') ->orderBy('created', 'DESC') ->extend('Drupal\Core\Database\Query\PagerSelectExtender') - ->limit($site_config->get('default_nodes_main')) + ->limit($site_config->get('max_posts')) ->addTag('node_access'); $nids = $select->execute()->fetchCol(); diff -u b/core/modules/system/config/system.site.yml b/core/modules/system/config/system.site.yml --- b/core/modules/system/config/system.site.yml +++ b/core/modules/system/config/system.site.yml @@ -4,5 +4,5 @@ -default_nodes_main: '10' +max_posts: '10' page: front: user - 403: '' 404: '' + 403: '' diff -u b/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc --- b/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -1506,9 +1506,9 @@ '#description' => t('Optionally, specify a relative URL to display as the front page. Leave blank to display the default content feed.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)), ); - $form['front_page']['default_nodes_main'] = array( + $form['front_page']['max_posts'] = array( '#type' => 'select', '#title' => t('Number of posts on front page'), - '#default_value' => $site_config->get('default_nodes_main'), + '#default_value' => $site_config->get('max_posts'), '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)), '#description' => t('The maximum number of posts displayed on overview pages such as the front page.'), '#access' => ($site_config->get('page.front') == 'node'), @@ -1583,7 +1583,7 @@ ->set('name', $form_state['values']['site_name']) ->set('mail', $form_state['values']['site_mail']) ->set('slogan', $form_state['values']['site_slogan']) - ->set('default_nodes_main', $form_state['values']['default_nodes_main']) + ->set('max_posts', $form_state['values']['max_posts']) ->set('page.front', $form_state['values']['site_frontpage']) ->set('page.403', $form_state['values']['site_403']) ->set('page.404', $form_state['values']['site_404']) diff -u b/core/modules/system/system.install b/core/modules/system/system.install --- b/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1934,7 +1934,7 @@ 'site_name' => 'name', 'site_mail' => 'mail', 'site_slogan' => 'slogan', - 'default_nodes_main' => 'default_nodes_main', + 'default_nodes_main' => 'max_posts', 'site_frontpage' => 'page.front', 'site_403' => 'page.403', 'site_404' => 'page.404', diff -u b/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc --- b/core/modules/taxonomy/taxonomy.pages.inc +++ b/core/modules/taxonomy/taxonomy.pages.inc @@ -42,7 +42,7 @@ 'term' => taxonomy_term_view($term, 'full'), ); - if ($nids = taxonomy_select_nodes($term->tid, TRUE, config('system.site')->get('default_nodes_main'))) { + if ($nids = taxonomy_select_nodes($term->tid, TRUE, config('system.site')->get('max_posts'))) { $nodes = node_load_multiple($nids); $build += node_view_multiple($nodes); $build['pager'] = array( only in patch2: --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php @@ -77,7 +77,8 @@ class ThemeTest extends WebTestBase { $original_path = _current_path(); // Set the current path to node because theme_get_suggestions() will query // it to see if we are on the front page. - variable_set('site_frontpage', 'node'); + config('system.site')->set('page.front', 'node')->save(); + drupal_static_reset('drupal_is_front_page'); _current_path('node'); $suggestions = theme_get_suggestions(array('node'), 'page'); // Set it back to not annoy the batch runner. only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php @@ -134,10 +134,6 @@ abstract class UpgradePathTestBase extends WebTestBase { // Generate and set a D8-compatible session cookie. $this->prepareD8Session(); - // Restore necessary variables. - // @todo Convert into config('system.site')->set('mail')? - $this->variable_set('site_mail', 'simpletest@example.com'); - drupal_set_time_limit($this->timeLimit); $this->setup = TRUE; }