From ec407ec945da8b7afee5c20f16cac6c041db1e25 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 3 Feb 2010 18:16:23 +0000 Subject: #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. --- includes/install.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'includes/install.inc') 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; + } } /** -- cgit v1.2.3