summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-08-14 09:25:48 +0000
committerDries Buytaert <dries@buytaert.net>2008-08-14 09:25:48 +0000
commit62735bad75611c43dbce1191149acf008370c8db (patch)
tree634f08494ba9cea72c53dd2ceabbc91aa97e03d1
parent6fbbaf066fb57d304d3585f0f34f5760d52f4006 (diff)
downloadbrdo-62735bad75611c43dbce1191149acf008370c8db.tar.gz
brdo-62735bad75611c43dbce1191149acf008370c8db.tar.bz2
- Patch #246143 by bjaspan, Damien Tournoud: make sure updates are run in numeric order, not in definition order.
-rw-r--r--includes/install.inc8
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;
}