glpi-project / plugins

GLPI Plugin Directory
http://plugins.glpi-project.org
21 stars 19 forks source link

Fix latest version in plugin's page and RSS feed #76

Closed cedric-anne closed 3 years ago

cedric-anne commented 3 years ago

Versions returned by Eloquent model are sorted by num field by MySQL. Unfortunately, MySQL does not provide natural sorting feature, and result is not always as expected (e.g. 2.9.5 > 2.10.1).

As it is not possible to automatically do a custom sorting when model data is fetched, I had to implement a sort function both on RSS response building and on Angular controller.