Ensure versions history are retrieved by id - Refs issue #1356

This commit is contained in:
Jérémy GAULIN 2015-08-09 20:21:41 +02:00
parent 364809a38e
commit e65f5c3c04
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;
}