Ensuring version order of database histroy.

This commit is contained in:
Peter Soots 2015-07-21 18:38:27 -07:00
parent 52ea4a73c8
commit 08da2b0b81
1 changed files with 6 additions and 0 deletions

View File

@ -391,6 +391,12 @@ class VersionManager
}
$historyInfo = Db::table('system_plugin_history')->where('code', $code)->get();
if (is_array($historyInfo)) {
usort($historyInfo, function ($a, $b) {
return version_compare($a->version, $b->version);
});
}
return $this->databaseHistory[$code] = $historyInfo;
}