Commit a862d3ae authored by webchick's avatar webchick
Browse files

#766100 by andypost: Fixed Undefined function _system_rebuild_theme_data()...

#766100 by andypost: Fixed Undefined function _system_rebuild_theme_data() when trying to run update.php from D6 -> D7.
parent 8eefdd5b
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
*/ */
/** /**
* Sets up the theming system for site installs, updates and when the site is * Sets up the theming system for maintenance page.
* in maintenance mode. It also applies when the database is unavailable.
* *
* Seven is always used for the initial install and update operations. In * Used for site installs, updates and when the site is in maintenance mode.
* other cases, Garland is used, but this can be overridden by setting a * 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. * "maintenance_theme" key in the $conf variable in settings.php.
*/ */
function _drupal_maintenance_theme() { function _drupal_maintenance_theme() {
...@@ -35,11 +36,16 @@ function _drupal_maintenance_theme() { ...@@ -35,11 +36,16 @@ function _drupal_maintenance_theme() {
$custom_theme = (isset($conf['maintenance_theme']) ? $conf['maintenance_theme'] : 'seven'); $custom_theme = (isset($conf['maintenance_theme']) ? $conf['maintenance_theme'] : 'seven');
} }
else { else {
if (!db_is_active()) { // The bootstrap was not complete. So we are operating in a crippled
// Because we are operating in a crippled environment, we need to // environment, we need to bootstrap just enough to allow hook invocations
// bootstrap just enough to allow hook invocations to work. // to work. See _drupal_log_error().
if (!class_exists('Database', FALSE)) {
require_once DRUPAL_ROOT . '/includes/database/database.inc'; require_once DRUPAL_ROOT . '/includes/database/database.inc';
spl_autoload_register('db_autoload'); 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['system']['filename'] = 'modules/system/system.module';
module_list(TRUE, FALSE, FALSE, $module_list); module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system'); drupal_load('module', 'system');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment