Important: Page media follows the reference sorting 

Description 

\FGTCLB\AcademicPrograms\Collection\FileReferenceCollection::getCollectionByPageIdAndField() read sys_file_reference without an ordering, so a page with several files in one field returned them in whatever order the database yielded. The sorting_foreign an editor arranges in the field was ignored, and on PostgreSQL the order could differ between two calls for the same page. The query now orders by sorting_foreign , with uid settling ties.

Impact 

Nothing this extension renders uses the collection. Code of a project that calls the method gets the files in the order the editor arranged them on the page. That is what SQLite, MySQL and MariaDB delivered in practice for references that were never reordered, and what editors expressed but never got for references that were.

Affected Installations 

Installations whose own code calls FileReferenceCollection::getCollectionByPageIdAndField() . Nothing has to be done on update.