diff options
Diffstat (limited to 'includes/install.inc')
-rw-r--r-- | includes/install.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/install.inc b/includes/install.inc index fd68ed9ab..56a1876fe 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -88,8 +88,8 @@ function drupal_load_updates() { * @param $module * A module name. * @return - * If the module has updates, an array of available updates. Otherwise, - * FALSE. + * If the module has updates, an array of available updates sorted by version. + * Otherwise, FALSE. */ function drupal_get_schema_versions($module) { $updates = array(); @@ -105,6 +105,10 @@ function drupal_get_schema_versions($module) { if (count($updates) == 0) { return FALSE; } + + // Make sure updates are run in numeric order, not in definition order. + sort($updates, SORT_NUMERIC); + return $updates; } |