diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-20 20:22:25 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-20 20:22:25 +0000 |
commit | a3bb66e4e81817737ce02ce8f3d0cff5c32fdae9 (patch) | |
tree | e31979e262ad7731f7355c494ac722d474e74080 /update.php | |
parent | 9c2e5a52c9762dacb97789226c2ee4065d1e18e9 (diff) | |
download | brdo-a3bb66e4e81817737ce02ce8f3d0cff5c32fdae9.tar.gz brdo-a3bb66e4e81817737ce02ce8f3d0cff5c32fdae9.tar.bz2 |
#259623 by dopry and Damien Tournoud: Convert includes/requires to use absolute paths.
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/update.php b/update.php index e899e4349..36a214a11 100644 --- a/update.php +++ b/update.php @@ -2,6 +2,11 @@ // $Id$ /** + * Root directory of Drupal installation. + */ +define('DRUPAL_ROOT', dirname(realpath(__FILE__))); + +/** * @file * Administrative page for handling updates from one Drupal version to another. * @@ -607,7 +612,7 @@ function update_check_requirements() { // Our custom error handler is not yet installed, so we just suppress them. ini_set('display_errors', FALSE); -require_once './includes/bootstrap.inc'; +require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; // We only load DRUPAL_BOOTSTRAP_CONFIGURATION for the update requirements // check to avoid reaching the PHP memory limit. @@ -616,12 +621,12 @@ if (empty($op)) { // Minimum load of components. drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION); - require_once './includes/install.inc'; - require_once './includes/file.inc'; - require_once './modules/system/system.install'; + require_once DRUPAL_ROOT . '/includes/install.inc'; + require_once DRUPAL_ROOT . '/includes/file.inc'; + require_once DRUPAL_ROOT . '/modules/system/system.install'; // Load module basics. - include_once './includes/module.inc'; + include_once DRUPAL_ROOT . '/includes/module.inc'; $module_list['system']['filename'] = 'modules/system/system.module'; $module_list['filter']['filename'] = 'modules/filter/filter.module'; module_list(TRUE, FALSE, FALSE, $module_list); @@ -662,8 +667,8 @@ ini_set('display_errors', TRUE); // Access check: if (!empty($update_free_access) || $user->uid == 1) { - include_once './includes/install.inc'; - include_once './includes/batch.inc'; + include_once DRUPAL_ROOT . '/includes/install.inc'; + include_once DRUPAL_ROOT . '/includes/batch.inc'; drupal_load_updates(); update_fix_d6_requirements(); |