From e65f5c3c0432f28334af0117a91c494e42867282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20GAULIN?= Date: Sun, 9 Aug 2015 20:21:41 +0200 Subject: [PATCH] Ensure versions history are retrieved by id - Refs issue #1356 --- modules/system/classes/VersionManager.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/system/classes/VersionManager.php b/modules/system/classes/VersionManager.php index 13b34e973..d00382f9a 100644 --- a/modules/system/classes/VersionManager.php +++ b/modules/system/classes/VersionManager.php @@ -390,13 +390,8 @@ class VersionManager return $this->databaseHistory[$code]; } - $historyInfo = Db::table('system_plugin_history')->where('code', $code)->get(); + $historyInfo = Db::table('system_plugin_history')->where('code', $code)->orderBy('id','ASC')->get(); - if (is_array($historyInfo)) { - usort($historyInfo, function ($a, $b) { - return version_compare($a->version, $b->version); - }); - } return $this->databaseHistory[$code] = $historyInfo; }