- Patch #430342 by kkaefer et al: usability improvement: changed 'site maintenance' to 'maintenance mode'.
							parent
							
								
									680979845a
								
							
						
					
					
						commit
						2f9af75438
					
				| 
						 | 
					@ -43,7 +43,7 @@ Let's begin!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
3.  Place the site in "Offline" mode, to let the database updates run without
 | 
					3.  Place the site in "Offline" mode, to let the database updates run without
 | 
				
			||||||
    interruption and avoid displaying errors to end users of the site. This
 | 
					    interruption and avoid displaying errors to end users of the site. This
 | 
				
			||||||
    option is at http://www.example.com/?q=admin/settings/site-maintenance
 | 
					    option is at http://www.example.com/?q=admin/settings/maintenance-mode
 | 
				
			||||||
    (replace www.example.com with your installation's domain name and path).
 | 
					    (replace www.example.com with your installation's domain name and path).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
4.  If using a custom or contributed theme, switch
 | 
					4.  If using a custom or contributed theme, switch
 | 
				
			||||||
| 
						 | 
					@ -103,7 +103,7 @@ Let's begin!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
14. Finally, return your site to "Online" mode so your visitors may resume
 | 
					14. Finally, return your site to "Online" mode so your visitors may resume
 | 
				
			||||||
    browsing. As in step #3, this option is available in your administration
 | 
					    browsing. As in step #3, this option is available in your administration
 | 
				
			||||||
    screens at http://www.example.com/?q=admin/settings/site-maintenance
 | 
					    screens at http://www.example.com/?q=admin/settings/maintenance-mode
 | 
				
			||||||
    (replace www.example.com with your installation's domain name and path).
 | 
					    (replace www.example.com with your installation's domain name and path).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For more information on upgrading visit
 | 
					For more information on upgrading visit
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1246,7 +1246,7 @@ function _drupal_bootstrap($phase) {
 | 
				
			||||||
 * Enables use of the theme system without requiring database access.
 | 
					 * Enables use of the theme system without requiring database access.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Loads and initializes the theme system for site installs, updates and when
 | 
					 * Loads and initializes the theme system for site installs, updates and when
 | 
				
			||||||
 * the site is in offline mode. This also applies when the database fails.
 | 
					 * the site is in maintenance mode. This also applies when the database fails.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @see _drupal_maintenance_theme()
 | 
					 * @see _drupal_maintenance_theme()
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2719,15 +2719,15 @@ function menu_path_is_external($path) {
 | 
				
			||||||
 *   TRUE for anonymous users not on the login page if the site is offline.
 | 
					 *   TRUE for anonymous users not on the login page if the site is offline.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function _menu_site_is_offline() {
 | 
					function _menu_site_is_offline() {
 | 
				
			||||||
  // Check if site is set to offline mode.
 | 
					  // Check if site is set to maintenance mode.
 | 
				
			||||||
  if (variable_get('site_offline', 0)) {
 | 
					  if (variable_get('site_offline', 0)) {
 | 
				
			||||||
    // Check if the user has administration privileges.
 | 
					    // Check if the user has administration privileges.
 | 
				
			||||||
    if (user_access('administer site configuration')) {
 | 
					    if (user_access('administer site configuration')) {
 | 
				
			||||||
      // Ensure that the offline message is displayed only once [allowing for
 | 
					      // Ensure that the offline message is displayed only once [allowing for
 | 
				
			||||||
      // page redirects], and specifically suppress its display on the site
 | 
					      // page redirects], and specifically suppress its display on the site
 | 
				
			||||||
      // maintenance page.
 | 
					      // maintenance page.
 | 
				
			||||||
      if (drupal_get_normal_path($_GET['q']) != 'admin/settings/site-maintenance') {
 | 
					      if (drupal_get_normal_path($_GET['q']) != 'admin/settings/maintenance-mode') {
 | 
				
			||||||
        drupal_set_message(t('Operating in offline mode. <a href="@url">Go online.</a>', array('@url' => url('admin/settings/site-maintenance'))), 'status', FALSE);
 | 
					        drupal_set_message(t('Operating in maintenance mode. <a href="@url">Go online.</a>', array('@url' => url('admin/settings/maintenance-mode'))), 'status', FALSE);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else {
 | 
					    else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Sets up the theming system for site installs, updates and when the site is
 | 
					 * Sets up the theming system for site installs, updates and when the site is
 | 
				
			||||||
 * in offline mode. It also applies when the database is unavailable.
 | 
					 * in maintenance mode. It also applies when the database is unavailable.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Minnelli is always used for the initial install and update operations. In
 | 
					 * Minnelli is always used for the initial install and update operations. In
 | 
				
			||||||
 * other cases, "settings.php" must have a "maintenance_theme" key set for the
 | 
					 * other cases, "settings.php" must have a "maintenance_theme" key set for the
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1724,7 +1724,7 @@ function system_date_time_lookup() {
 | 
				
			||||||
 * @ingroup forms
 | 
					 * @ingroup forms
 | 
				
			||||||
 * @see system_settings_form()
 | 
					 * @see system_settings_form()
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function system_site_maintenance_settings() {
 | 
					function system_site_maintenance_mode() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $form['site_offline'] = array(
 | 
					  $form['site_offline'] = array(
 | 
				
			||||||
    '#type' => 'radios',
 | 
					    '#type' => 'radios',
 | 
				
			||||||
| 
						 | 
					@ -1738,7 +1738,7 @@ function system_site_maintenance_settings() {
 | 
				
			||||||
    '#type' => 'textarea',
 | 
					    '#type' => 'textarea',
 | 
				
			||||||
    '#title' => t('Site offline message'),
 | 
					    '#title' => t('Site offline message'),
 | 
				
			||||||
    '#default_value' => t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))),
 | 
					    '#default_value' => t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))),
 | 
				
			||||||
    '#description' => t('Message to show visitors when the site is in offline mode.')
 | 
					    '#description' => t('Message to show visitors when the site is in maintenance mode.')
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return system_settings_form($form, TRUE);
 | 
					  return system_settings_form($form, TRUE);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2812,7 +2812,7 @@ function system_update_7003() {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (isset($invalid_host)) {
 | 
					  if (isset($invalid_host)) {
 | 
				
			||||||
    drupal_set_message('Drupal no longer supports wildcard IP address blocking. Visitors whose IP addresses match ranges you have previously set using <em>access rules</em> will no longer be blocked from your site when you take it out of maintenance mode. See the <a href="http://drupal.org/node/24302">IP address and referrer blocking Handbook page</a> for alternative methods.', 'warning');
 | 
					    drupal_set_message('Drupal no longer supports wildcard IP address blocking. Visitors whose IP addresses match ranges you have previously set using <em>access rules</em> will no longer be blocked from your site when you put the site online. See the <a href="http://drupal.org/node/24302">IP address and referrer blocking Handbook page</a> for alternative methods.', 'warning');
 | 
				
			||||||
    $ret[] = array('success' => TRUE, 'query' => '');
 | 
					    $ret[] = array('success' => TRUE, 'query' => '');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  // Make sure not to block any IP addresses that were specifically allowed by access rules.
 | 
					  // Make sure not to block any IP addresses that were specifically allowed by access rules.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,7 +70,7 @@ function system_help($path, $arg) {
 | 
				
			||||||
      $output .= '<li>' . t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) . '</li>';
 | 
					      $output .= '<li>' . t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) . '</li>';
 | 
				
			||||||
      $output .= '<li>' . t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) . '</li>';
 | 
					      $output .= '<li>' . t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) . '</li>';
 | 
				
			||||||
      $output .= '<li>' . t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) . '</li>';
 | 
					      $output .= '<li>' . t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) . '</li>';
 | 
				
			||||||
      $output .= '<li>' . t('basic configuration options for your site, including <a href="@regional-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily offline.', array('@regional-settings' => url('admin/settings/regional-settings'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) . '</li></ul>';
 | 
					      $output .= '<li>' . t('basic configuration options for your site, including <a href="@regional-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@maintenance-mode">maintenance mode</a> for taking your site temporarily offline.', array('@regional-settings' => url('admin/settings/regional-settings'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@maintenance-mode' => url('admin/settings/maintenance-mode'))) . '</li></ul>';
 | 
				
			||||||
      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) . '</p>';
 | 
					      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) . '</p>';
 | 
				
			||||||
      return $output;
 | 
					      return $output;
 | 
				
			||||||
    case 'admin/by-module':
 | 
					    case 'admin/by-module':
 | 
				
			||||||
| 
						 | 
					@ -699,11 +699,11 @@ function system_menu() {
 | 
				
			||||||
    'page callback' => 'system_date_time_lookup',
 | 
					    'page callback' => 'system_date_time_lookup',
 | 
				
			||||||
    'access arguments' => array('administer site configuration'),
 | 
					    'access arguments' => array('administer site configuration'),
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
  $items['admin/settings/site-maintenance'] = array(
 | 
					  $items['admin/settings/maintenance-mode'] = array(
 | 
				
			||||||
    'title' => 'Site maintenance',
 | 
					    'title' => 'Maintenance mode',
 | 
				
			||||||
    'description' => 'Take the site offline for maintenance or bring it back online.',
 | 
					    'description' => 'Take the site offline for maintenance or bring it back online.',
 | 
				
			||||||
    'page callback' => 'drupal_get_form',
 | 
					    'page callback' => 'drupal_get_form',
 | 
				
			||||||
    'page arguments' => array('system_site_maintenance_settings'),
 | 
					    'page arguments' => array('system_site_maintenance_mode'),
 | 
				
			||||||
    'access arguments' => array('administer site configuration'),
 | 
					    'access arguments' => array('administer site configuration'),
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
  $items['admin/settings/clean-urls'] = array(
 | 
					  $items['admin/settings/clean-urls'] = array(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -238,7 +238,7 @@ $conf = array(
 | 
				
			||||||
#   'anonymous' => 'Visitor',
 | 
					#   'anonymous' => 'Visitor',
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * A custom theme can be set for the offline page. This applies when the site
 | 
					 * A custom theme can be set for the offline page. This applies when the site
 | 
				
			||||||
 * is explicitly set to offline mode through the administration page or when
 | 
					 * is explicitly set to maintenance mode through the administration page or when
 | 
				
			||||||
 * the database is inactive due to an error. It can be set through the
 | 
					 * the database is inactive due to an error. It can be set through the
 | 
				
			||||||
 * 'maintenance_theme' key. The template file should also be copied into the
 | 
					 * 'maintenance_theme' key. The template file should also be copied into the
 | 
				
			||||||
 * theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
 | 
					 * theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -290,7 +290,7 @@ function update_script_selection_form() {
 | 
				
			||||||
function update_batch() {
 | 
					function update_batch() {
 | 
				
			||||||
  global $base_url;
 | 
					  global $base_url;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // During the update, toggle site maintenance so that schema changes do not
 | 
					  // During the update, bring the site offline so that schema changes do not
 | 
				
			||||||
  // affect visiting users.
 | 
					  // affect visiting users.
 | 
				
			||||||
  drupal_set_session('site_offline', variable_get('site_offline', FALSE));
 | 
					  drupal_set_session('site_offline', variable_get('site_offline', FALSE));
 | 
				
			||||||
  if ($_SESSION['site_offline'] == FALSE) {
 | 
					  if ($_SESSION['site_offline'] == FALSE) {
 | 
				
			||||||
| 
						 | 
					@ -330,7 +330,7 @@ function update_finished($success, $results, $operations) {
 | 
				
			||||||
  drupal_set_session('update_success', $success);
 | 
					  drupal_set_session('update_success', $success);
 | 
				
			||||||
  drupal_set_session('updates_remaining', $operations);
 | 
					  drupal_set_session('updates_remaining', $operations);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Now that the update is done, we can disable site maintenance if it was
 | 
					  // Now that the update is done, we can put the site back online if it was
 | 
				
			||||||
  // previously turned off.
 | 
					  // previously turned off.
 | 
				
			||||||
  if (isset($_SESSION['site_offline']) && $_SESSION['site_offline'] == FALSE) {
 | 
					  if (isset($_SESSION['site_offline']) && $_SESSION['site_offline'] == FALSE) {
 | 
				
			||||||
    variable_set('site_offline', FALSE);
 | 
					    variable_set('site_offline', FALSE);
 | 
				
			||||||
| 
						 | 
					@ -424,7 +424,7 @@ function update_info_page() {
 | 
				
			||||||
  $output .= "<ol>\n";
 | 
					  $output .= "<ol>\n";
 | 
				
			||||||
  $output .= "<li><strong>Back up your database</strong>. This process will change your database values and in case of emergency you may need to revert to a backup.</li>\n";
 | 
					  $output .= "<li><strong>Back up your database</strong>. This process will change your database values and in case of emergency you may need to revert to a backup.</li>\n";
 | 
				
			||||||
  $output .= "<li><strong>Back up your code</strong>. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.</li>\n";
 | 
					  $output .= "<li><strong>Back up your code</strong>. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.</li>\n";
 | 
				
			||||||
  $output .= '<li>Put your site into <a href="' . base_path() . '?q=admin/settings/site-maintenance">maintenance mode</a>.</li>' . "\n";
 | 
					  $output .= '<li>Put your site into <a href="' . base_path() . '?q=admin/settings/maintenance-mode">maintenance mode</a>.</li>' . "\n";
 | 
				
			||||||
  $output .= "<li>Install your new files in the appropriate location, as described in the handbook.</li>\n";
 | 
					  $output .= "<li>Install your new files in the appropriate location, as described in the handbook.</li>\n";
 | 
				
			||||||
  $output .= "</ol>\n";
 | 
					  $output .= "</ol>\n";
 | 
				
			||||||
  $output .= "<p>When you have performed the steps above, you may proceed.</p>\n";
 | 
					  $output .= "<p>When you have performed the steps above, you may proceed.</p>\n";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue