Commit 4758c8cd authored by Dries's avatar Dries
Browse files

- Patch #40518 by drumm: upgrade system fixes.

parent c17ff754
......@@ -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) {
......
......@@ -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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment