Merge pull request #1366 from gabsource/fix-version

Ensure versions history are retrieved by id ASC (bug introduced by PR #1304)
This commit is contained in:
Samuel Georges 2015-08-15 09:58:00 +10:00
commit de2a088e20
1 changed files with 1 additions and 6 deletions

View File

@ -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;
}