From 4758c8cd285b6c706c55a2d097f2003f142f4e66 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Fri, 9 Dec 2005 16:14:26 +0000 Subject: [PATCH] - Patch #40518 by drumm: upgrade system fixes. --- includes/install.inc | 7 +++++-- update.php | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/install.inc b/includes/install.inc index 472cc94077f8..c62039091e3f 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -29,8 +29,11 @@ function drupal_get_schema_versions($module) { $functions = get_defined_functions(); foreach ($functions['user'] as $function) { - if (strpos($function, $module .'_update') === 0) { - $updates[] = (int) substr($function, strlen($module .'_update_')); + if (strpos($function, $module .'_update_') === 0) { + $version = substr($function, strlen($module .'_update_')); + if (is_numeric($version)) { + $updates[] = $version; + } } } if (count($updates) == 0) { diff --git a/update.php b/update.php index 9b16492baf2e..14c19e4d0681 100644 --- a/update.php +++ b/update.php @@ -292,8 +292,9 @@ function update_selection_page() { '#collapsed' => TRUE, ); foreach (module_list() as $module) { - if (module_hook($module, 'version')) { - $updates = drupal_map_assoc(drupal_get_schema_versions($module)); + $updates = drupal_get_schema_versions($module); + if ($updates !== FALSE) { + $updates = drupal_map_assoc($updates); $updates[] = 'No updates available'; $form['start'][$module] = array( -- GitLab