diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-03 18:16:23 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-03 18:16:23 +0000 |
commit | ec407ec945da8b7afee5c20f16cac6c041db1e25 (patch) | |
tree | 7fc94e0c97a2a7c3a69fd8527a2b939cf6bb70ef /includes/install.inc | |
parent | 59c9219fb7b91a9d159709fd04e81969a610c8cd (diff) | |
download | brdo-ec407ec945da8b7afee5c20f16cac6c041db1e25.tar.gz brdo-ec407ec945da8b7afee5c20f16cac6c041db1e25.tar.bz2 |
#211182 by Damien Tournoud, David_Rothstein, clemens.tolboom, scor, hunmonk, et al: Allow updates to specify dependencies to ensure they run in a predictable order.
Diffstat (limited to 'includes/install.inc')
-rw-r--r-- | includes/install.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/install.inc b/includes/install.inc index 55cda0bba..c3e0536c3 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -131,7 +131,8 @@ function drupal_get_schema_versions($module) { * Set to TRUE if you want to get information about all modules in the * system. * @return - * The currently installed schema version. + * The currently installed schema version, or SCHEMA_UNINSTALLED if the + * module is not installed. */ function drupal_get_installed_schema_version($module, $reset = FALSE, $array = FALSE) { static $versions = array(); @@ -148,7 +149,12 @@ function drupal_get_installed_schema_version($module, $reset = FALSE, $array = F } } - return $array ? $versions : $versions[$module]; + if ($array) { + return $versions; + } + else { + return isset($versions[$module]) ? $versions[$module] : SCHEMA_UNINSTALLED; + } } /** |