Fix patch execution order

This commit is contained in:
Romain Neutron
2013-12-04 14:21:38 +01:00
parent e70e35ae04
commit d6e2a604ba

View File

@@ -806,7 +806,10 @@ abstract class base implements cache_cacheableInterface
$upgrader->add_steps_complete(1)
->add_steps(count($list_patches))
->set_current_message(sprintf(_('Applying patches on %s'), $this->get_dbname()));
ksort($list_patches);
uasort($list_patches, function (\patchInterface $patch1, \patchInterface $patch2) {
return version::lt($patch1->get_release(), $patch2->get_release()) ? -1 : 1;
});
$success = true;