--- system.admin.inc Thu Jan 15 10:14:12 1970 +++ system.admin.inc Thu Jan 15 10:14:12 1970 @@ -318,6 +318,10 @@ // path after that. module_invoke('locale', 'system_update', array_diff($new_theme_list, $old_theme_list)); + // make sure that later calls to _system_theme_data + // don't get cached theme information. + _system_theme_data(TRUE, TRUE); + return; } --- system.module Thu Jan 15 10:14:12 1970 +++ system.module Thu Jan 15 10:14:12 1970 @@ -828,12 +828,27 @@ /** * Helper function to scan and collect theme .info data and their engines. * + * @param $reset :bool + * if TRUE, the cached value will be reset + * + * @param $skip_run :bool + * if TRUE, the function will skip the run. + * makes sense in combination with $reset=true, if we want + * to make sure that later calls don't get a cached result, + * but we are not interested in the return value. + * * @return * An associative array of themes information. */ -function _system_theme_data() { +function _system_theme_data($reset = FALSE, $skip_run = FALSE) { static $themes_info = array(); + if ($reset) { + $themes_info = array(); + } + if ($skip_run) { + return; + } if (empty($themes_info)) { // Find themes $themes = drupal_system_listing('\.info$', 'themes');