summaryrefslogtreecommitdiff
path: root/includes/theme.maintenance.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-20 08:19:01 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-20 08:19:01 +0000
commita862d3aeadf1dfda5eb94d3fca9244de3f44744d (patch)
tree5db4aeb9178deb8234ff73b740111a422919d105 /includes/theme.maintenance.inc
parent8eefdd5b7781c93284823589540700ae4ee70f4c (diff)
downloadbrdo-a862d3aeadf1dfda5eb94d3fca9244de3f44744d.tar.gz
brdo-a862d3aeadf1dfda5eb94d3fca9244de3f44744d.tar.bz2
#766100 by andypost: Fixed Undefined function _system_rebuild_theme_data() when trying to run update.php from D6 -> D7.
Diffstat (limited to 'includes/theme.maintenance.inc')
-rw-r--r--includes/theme.maintenance.inc20
1 files changed, 13 insertions, 7 deletions
diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc
index 1a60911b1..536db1ee4 100644
--- a/includes/theme.maintenance.inc
+++ b/includes/theme.maintenance.inc
@@ -7,11 +7,12 @@
*/
/**
- * Sets up the theming system for site installs, updates and when the site is
- * in maintenance mode. It also applies when the database is unavailable.
+ * Sets up the theming system for maintenance page.
*
- * Seven is always used for the initial install and update operations. In
- * other cases, Garland is used, but this can be overridden by setting a
+ * Used for site installs, updates and when the site is in maintenance mode.
+ * It also applies when the database is unavailable or bootstrap was not
+ * complete. Seven is always used for the initial install and update operations.
+ * In other cases, Garland is used, but this can be overridden by setting a
* "maintenance_theme" key in the $conf variable in settings.php.
*/
function _drupal_maintenance_theme() {
@@ -35,11 +36,16 @@ function _drupal_maintenance_theme() {
$custom_theme = (isset($conf['maintenance_theme']) ? $conf['maintenance_theme'] : 'seven');
}
else {
- if (!db_is_active()) {
- // Because we are operating in a crippled environment, we need to
- // bootstrap just enough to allow hook invocations to work.
+ // The bootstrap was not complete. So we are operating in a crippled
+ // environment, we need to bootstrap just enough to allow hook invocations
+ // to work. See _drupal_log_error().
+ if (!class_exists('Database', FALSE)) {
require_once DRUPAL_ROOT . '/includes/database/database.inc';
spl_autoload_register('db_autoload');
+ }
+
+ // Ensure that system.module is loaded.
+ if (!function_exists('_system_rebuild_theme_data')) {
$module_list['system']['filename'] = 'modules/system/system.module';
module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system');