diff --git a/core/authorize.php b/core/authorize.php index a9b5a83..a439975 100644 --- a/core/authorize.php +++ b/core/authorize.php @@ -20,7 +20,7 @@ * @link authorize Authorized operation helper functions @endlink */ -// Changes the directory to the Drupal root. +// Change the directory to the Drupal root. chdir('..'); /** @@ -55,7 +55,7 @@ function authorize_access_denied_page() { * have access to the 'administer software updates' permission. * * @return - * TRUE if current user can run authorize.php, and FALSE if it cannot. + * TRUE if the current user can run authorize.php, and FALSE if not. */ function authorize_access_allowed() { return variable_get('allow_authorize_operations', TRUE) && user_access('administer software updates'); diff --git a/core/install.php b/core/install.php index cfa2d44..6f046b2 100644 --- a/core/install.php +++ b/core/install.php @@ -5,7 +5,7 @@ * Initiates a browser-based installation of Drupal. */ -// Changes directory to Drupal root. +// Change the directory to the Drupal root. chdir('..'); /** @@ -14,7 +14,7 @@ chdir('..'); define('DRUPAL_ROOT', getcwd()); /** - * Sets a global flag to indicate the site is in installation mode. + * Global flag to indicate the site is in installation mode. * * The constant is defined using define() instead of const so that PHP * versions prior to 5.3 can display proper PHP requirements instead of causing @@ -22,7 +22,7 @@ define('DRUPAL_ROOT', getcwd()); */ define('MAINTENANCE_MODE', 'install'); -// Exits early if running an incompatible PHP version to avoid fatal errors. +// Exit early if running an incompatible PHP version to avoid fatal errors. // The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not // yet available. It is defined in bootstrap.inc, but it is not possible to // load that file yet as it would cause a fatal error on older versions of PHP. @@ -31,6 +31,6 @@ if (version_compare(PHP_VERSION, '5.3.3') < 0) { exit; } -// Starts the installer. +// Start the installer. require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; install_drupal(); diff --git a/core/update.php b/core/update.php index fb5d991..52cf3d0 100644 --- a/core/update.php +++ b/core/update.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -// Changes the directory to the Drupal root. +// Change the directory to the Drupal root. chdir('..'); /** @@ -25,7 +25,7 @@ chdir('..'); */ define('DRUPAL_ROOT', getcwd()); -// Exits early if an incompatible PHP version would cause fatal errors. +// Exit early if an incompatible PHP version would cause fatal errors. // The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not // yet available. It is defined in bootstrap.inc, but it is not possible to // load that file yet as it would cause a fatal error on older versions of PHP. @@ -58,6 +58,7 @@ function update_selection_page() { return $output; } + /** * Form constructor for the list of available database module updates. */ @@ -163,7 +164,7 @@ function update_script_selection_form($form, &$form_state) { } /** - * Provides links to homepage and administration pages. + * Provides links to the homepage and administration pages. */ function update_helpful_links() { $links['front'] = array( @@ -180,7 +181,7 @@ function update_helpful_links() { } /** - * Displays results of update script with any accompanying errors. + * Displays results of the update script with any accompanying errors. */ function update_results_page() { drupal_set_title('Drupal database update'); @@ -274,8 +275,8 @@ function update_info_page() { $token = drupal_get_token('update'); $output = '

Use this utility to update your database whenever a new release of Drupal or a module is installed.

For more detailed information, see the upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

'; $output .= "
    \n"; - $output .= "
  1. Back up your database. This process will change your database values. In case of emergency you may need to revert to a backup.
  2. \n"; - $output .= "
  3. Back up your code. Hint: when backing up module code, do not leave the backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.
  4. \n"; + $output .= "
  5. Back up your database. This process will change your database values and in case of emergency you may need to revert to a backup.
  6. \n"; + $output .= "
  7. Back up your code. 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.
  8. \n"; $output .= '
  9. Put your site into maintenance mode.
  10. ' . "\n"; $output .= "
  11. Install your new files in the appropriate location, as described in the handbook.
  12. \n"; $output .= "
\n"; @@ -290,10 +291,10 @@ function update_access_denied_page() { drupal_add_http_header('Status', '403 Forbidden'); watchdog('access denied', 'update.php', array(), WATCHDOG_WARNING); drupal_set_title('Access denied'); - return '

Access denied. You are not authorized to access this page. Log in using 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 edit settings.php to bypass this access check. To do this:

+ return '

Access denied. You are not authorized to access this page. 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 edit settings.php to bypass this access check. To do this:

    -
  1. Find your settings.php and open it with a text editor. From the main Drupal directory where you installed all the files, go to sites/your_site_name if such directory exists, or else to sites/default which applies otherwise.
  2. -
  3. Find the line inside your settings.php file that says $update_free_access = FALSE;. Change it to $update_free_access = TRUE;.
  4. +
  5. With a text editor find the settings.php file on your system. From the main Drupal directory that you installed all the files into, go to sites/your_site_name if such directory exists, or else to sites/default which applies otherwise.
  6. +
  7. There is a line inside your settings.php file that says $update_free_access = FALSE;. Change it to $update_free_access = TRUE;.
  8. As soon as the update.php script is done, you must change the settings.php file back to its original form with $update_free_access = FALSE;.
  9. To avoid having this problem in the future, remember to log in to your website using either an account with the administer software updates permission or the site maintenance account (the account you created during installation) before you backup your database at the beginning of the update process.
';