From 1d0fa04d3383bacc9133a33e2acd3ea665407917 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 9 Dec 2005 15:46:47 +0000 Subject: - Patch #40518 by drumm: remove hook_versions. --- includes/install.inc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'includes') diff --git a/includes/install.inc b/includes/install.inc index 6f8a86f65..472cc9407 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -27,13 +27,16 @@ foreach (module_list() as $module) { * FALSE. */ function drupal_get_schema_versions($module) { - if (!($max = module_invoke($module, 'version', SCHEMA))) { - return FALSE; + $functions = get_defined_functions(); + foreach ($functions['user'] as $function) { + if (strpos($function, $module .'_update') === 0) { + $updates[] = (int) substr($function, strlen($module .'_update_')); + } } - if (!($min = module_invoke($module, 'version', SCHEMA_MIN))) { - $min = 1; + if (count($updates) == 0) { + return FALSE; } - return range($min, $max); + return $updates; } /** -- cgit v1.2.3