diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 5402dae..90cfec5 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2622,6 +2622,9 @@ function drupal_common_theme() { 'variables' => array('content' => NULL, 'show_messages' => TRUE), 'template' => 'install-page', ), + 'maintenance_access_denied' => array( + 'variables' => array('script_name' => 'update.php', 'settings_name' => 'update_free_access', 'login' => TRUE, 'postfix' => ''), + ), 'task_list' => array( 'variables' => array('items' => NULL, 'active' => NULL, 'variant' => NULL), ), diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index d206e79..dc5c444 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -199,13 +199,13 @@ function theme_authorize_message($variables) { * @return * Rendered HTML warning with 403 status. */ -function maintenance_access_denied_page($script_name = 'update.php', $settings_name = 'update_free_access', $login = TRUE, $postfix = '') { +function theme_maintenance_access_denied($variables) { drupal_add_http_header('Status', '403 Forbidden'); header(\Drupal::request()->server->get('SERVER_PROTOCOL') . ' 403 Forbidden'); - watchdog('access denied', $script_name, NULL, WATCHDOG_WARNING); + watchdog('access denied', $variables['script_name'], NULL, WATCHDOG_WARNING); drupal_set_title('Access denied'); $output = '
Access denied. You are not authorized to access this page.';
- if ($login) {
+ if ($variables['login']) {
$output .= 'Log in using either an account with the administer software updates permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to';
}
else {
@@ -214,17 +214,16 @@ function maintenance_access_denied_page($script_name = 'update.php', $settings_n
$output .= 'edit settings.php to bypass this access check. To do this:
sites/your_site_name if such directory exists, or else to sites/default which applies otherwise.$settings[\'' . $settings_name . '\'] = FALSE;. Change it to $settings[\'' . $settings_name . '\'] = TRUE;.$settings[\'' . $settings_name .'\'] = FALSE;.$settings[\'' . $variables['settings_name'] . '\'] = FALSE;. Change it to $settings[\'' . $variables['settings_name'] . '\'] = TRUE;.$settings[\'' . $variables['settings_name'] .'\'] = FALSE;.