[Scummvm-git-logs] scummvm-web master -> c95bf5715e7d1aad3e1dcfbfb76aef23768b9207

Thunderforge noreply at scummvm.org
Thu Nov 18 23:06:49 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
c95bf5715e WEB: Sort downloads by version (#177)


Commit: c95bf5715e7d1aad3e1dcfbfb76aef23768b9207
    https://github.com/scummvm/scummvm-web/commit/c95bf5715e7d1aad3e1dcfbfb76aef23768b9207
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2021-11-18T17:06:46-06:00

Commit Message:
WEB: Sort downloads by version (#177)

Changed paths:
    include/Models/DownloadsModel.php


diff --git a/include/Models/DownloadsModel.php b/include/Models/DownloadsModel.php
index 559547f2..b0f48d49 100644
--- a/include/Models/DownloadsModel.php
+++ b/include/Models/DownloadsModel.php
@@ -5,6 +5,7 @@ namespace ScummVM\Models;
 use ScummVM\Objects\DownloadsSection;
 use DeviceDetector\Parser\OperatingSystem as OsParser;
 use ScummVM\OrmObjects\DownloadQuery;
+use Propel\Runtime\ActiveQuery\Criteria;
 
 /**
  * The DownloadsModel will produce DownloadsSection objects.
@@ -17,6 +18,7 @@ class DownloadsModel extends BasicModel
         $sections = $this->getFromCache();
         if (is_null($sections)) {
             $parsedData = DownloadQuery::create()
+                ->orderByVersion(Criteria::DESC) // Newest first
                 ->findByEnabled(true);
             $sections = [];
             $sectionsData = $this->getSectionData();




More information about the Scummvm-git-logs mailing list