Commit 62735bad authored by Dries's avatar Dries
Browse files

- Patch #246143 by bjaspan, Damien Tournoud: make sure updates are run in...

- Patch #246143 by bjaspan, Damien Tournoud: make sure updates are run in numeric order, not in definition order.
parent 6fbbaf06
...@@ -88,8 +88,8 @@ function drupal_load_updates() { ...@@ -88,8 +88,8 @@ function drupal_load_updates() {
* @param $module * @param $module
* A module name. * A module name.
* @return * @return
* If the module has updates, an array of available updates. Otherwise, * If the module has updates, an array of available updates sorted by version.
* FALSE. * Otherwise, FALSE.
*/ */
function drupal_get_schema_versions($module) { function drupal_get_schema_versions($module) {
$updates = array(); $updates = array();
...@@ -105,6 +105,10 @@ function drupal_get_schema_versions($module) { ...@@ -105,6 +105,10 @@ function drupal_get_schema_versions($module) {
if (count($updates) == 0) { if (count($updates) == 0) {
return FALSE; return FALSE;
} }
// Make sure updates are run in numeric order, not in definition order.
sort($updates, SORT_NUMERIC);
return $updates; return $updates;
} }
......
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