diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 06:53:26 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 06:53:26 +0000 |
commit | 3604231dd1d7eca9e650b743bdcad811e83d0afb (patch) | |
tree | 69e584e89e5822a0b8aa51514890ed1dda91e405 /includes/install.inc | |
parent | 8894138027b3cdecb834598cb05a3daef7c5b5eb (diff) | |
download | brdo-3604231dd1d7eca9e650b743bdcad811e83d0afb.tar.gz brdo-3604231dd1d7eca9e650b743bdcad811e83d0afb.tar.bz2 |
#521838 follow-up by jrchamp: Clean up drupal_get_schema_versions().
Diffstat (limited to 'includes/install.inc')
-rw-r--r-- | includes/install.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/install.inc b/includes/install.inc index 577724c0a..9af6644e0 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -95,6 +95,11 @@ function drupal_get_schema_versions($module) { $updates = &drupal_static(__FUNCTION__, NULL); if (!isset($updates[$module])) { $updates = array(); + + foreach (module_list() as $loaded_module) { + $updates[$loaded_module] = array(); + } + // Prepare regular expression to match all possible defined hook_update_N(). $regexp = '/^(?P<module>.+)_update_(?P<version>\d+)$/'; $functions = get_defined_functions(); @@ -117,7 +122,7 @@ function drupal_get_schema_versions($module) { sort($module_updates, SORT_NUMERIC); } } - return isset($updates[$module]) ? $updates[$module] : FALSE; + return empty($updates[$module]) ? FALSE : $updates[$module]; } /** |