Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.366 diff -u -9 -p -r1.366 bootstrap.inc --- includes/bootstrap.inc 24 Mar 2010 09:17:37 -0000 1.366 +++ includes/bootstrap.inc 25 Mar 2010 10:50:13 -0000 @@ -656,35 +656,32 @@ function drupal_settings_initialize() { function drupal_get_filename($type, $name, $filename = NULL) { // The location of files will not change during the request, so do not use // drupal_static(). static $files = array(); if (!isset($files[$type])) { $files[$type] = array(); } - if (!empty($filename) && file_exists($filename)) { + if (!empty($filename)) { $files[$type][$name] = $filename; } elseif (isset($files[$type][$name])) { // nothing } // Verify that we have an active database connection, before querying // the database. This is required because this function is called both // before we have a database connection (i.e. during installation) and // when a database connection fails. else { try { if (function_exists('db_query')) { - $file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField(); - if (file_exists($file)) { - $files[$type][$name] = $file; - } + $files[$type][$name] = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField(); } } catch (Exception $e) { // The database table may not exist because Drupal is not yet installed, // or the database might be down. We have a fallback for this case so we // hide the error completely. } // Fallback to searching the filesystem if the database could not find the // file or the file returned by the database is not found. Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.584 diff -u -9 -p -r1.584 theme.inc --- includes/theme.inc 21 Mar 2010 04:05:23 -0000 1.584 +++ includes/theme.inc 25 Mar 2010 10:50:13 -0000 @@ -568,39 +568,35 @@ function list_themes($refresh = FALSE) { } if (empty($list)) { $list = array(); $themes = array(); // Extract from the database only when it is available. // Also check that the site is not in the middle of an install or update. if (!defined('MAINTENANCE_MODE') && db_is_active()) { foreach (system_list('theme') as $theme) { - if (file_exists($theme->filename)) { - $theme->info = unserialize($theme->info); - $themes[] = $theme; - } + $theme->info = unserialize($theme->info); + $themes[] = $theme; } } else { // Scan the installation when the database should not be read. $themes = _system_rebuild_theme_data(); } foreach ($themes as $theme) { foreach ($theme->info['stylesheets'] as $media => $stylesheets) { foreach ($stylesheets as $stylesheet => $path) { $theme->stylesheets[$media][$stylesheet] = $path; } } foreach ($theme->info['scripts'] as $script => $path) { - if (file_exists($path)) { - $theme->scripts[$script] = $path; - } + $theme->scripts[$script] = $path; } if (isset($theme->info['engine'])) { $theme->engine = $theme->info['engine']; } if (isset($theme->info['base theme'])) { $theme->base_theme = $theme->info['base theme']; } // Status is normally retrieved from the database. Add zero values when // read from the installation directory to prevent notices. Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.904 diff -u -9 -p -r1.904 system.module --- modules/system/system.module 21 Mar 2010 21:20:43 -0000 1.904 +++ modules/system/system.module 25 Mar 2010 10:50:14 -0000 @@ -2251,18 +2251,19 @@ function _system_rebuild_module_data() { * @return * Array of all available modules and their data. */ function system_rebuild_module_data() { $modules = _system_rebuild_module_data(); ksort($modules); system_get_files_database($modules, 'module'); system_update_files_database($modules, 'module'); $modules = _module_build_dependencies($modules); + system_list_reset(); return $modules; } /** * Refresh bootstrap column in the system table. * * This is called internally by module_enable/disable() to flag modules that * implement hooks used during bootstrap, such as hook_boot(). These modules * are loaded earlier to invoke the hooks. @@ -2423,18 +2424,19 @@ function _system_rebuild_theme_data() { * * @return * Array of all available themes and their data. */ function system_rebuild_theme_data() { $themes = _system_rebuild_theme_data(); ksort($themes); system_get_files_database($themes, 'theme'); system_update_files_database($themes, 'theme'); + system_list_reset(); return $themes; } /** * Find all the base themes for the specified theme. * * Themes can inherit templates and function implementations from earlier themes. * * @param $themes