[Scummvm-git-logs] scummvm-web master -> 264624f0f37c1f72801c61cfa7663cfc25750625

Thunderforge noreply at scummvm.org
Tue Jan 18 00:10:18 UTC 2022


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:
264624f0f3 DATA: Removing constants for Android & Ubuntu versions (#200)


Commit: 264624f0f37c1f72801c61cfa7663cfc25750625
    https://github.com/scummvm/scummvm-web/commit/264624f0f37c1f72801c61cfa7663cfc25750625
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2022-01-17T18:10:13-06:00

Commit Message:
DATA: Removing constants for Android & Ubuntu versions (#200)

Now that we have the "version" column on the spreadsheet, the constants are unnecessary. This was a holdover from back when versions were determined by the file names and these URLs didn't have them.

Changed paths:
    include/Constants.php
    include/Models/DownloadsModel.php


diff --git a/include/Constants.php b/include/Constants.php
index 8f25935b..f70ed19d 100644
--- a/include/Constants.php
+++ b/include/Constants.php
@@ -8,9 +8,6 @@ class Constants
         /* Current version. */
         define('RELEASE', '2.5.1');
         define('RELEASE_TOOLS', '2.5.0');
-        define('RELEASE_DEBIAN', '2.2.0');
-        define('RELEASE_SNAP_STORE', '2.5.1');
-        define('RELEASE_ANDROID_STORE', '2.5.0');
 
         /* News items on the front page. */
         define('NEWS_ITEMS', 5);
diff --git a/include/Models/DownloadsModel.php b/include/Models/DownloadsModel.php
index f3b42cf8..bb3fb90d 100644
--- a/include/Models/DownloadsModel.php
+++ b/include/Models/DownloadsModel.php
@@ -107,6 +107,7 @@ class DownloadsModel extends BasicModel
         // If we found a user agent for this platform, then generate a download link
         if (!empty($downloads) && ($downloads[0] !== null)) {
             $download = $downloads[0];
+            $version = $download->getVersion();
 
             $name = strip_tags($download->getName());
             if (str_starts_with($download->getURL(), 'http')) {
@@ -114,7 +115,6 @@ class DownloadsModel extends BasicModel
                 $url = str_replace('{$version}', $version, $url);
             } else {
                 // Construct the URL and fill in the version
-                $version = $download->getVersion();
                 $file_name = str_replace('{$version}', $version, DOWNLOADS_URL . $download->getURL());
                 $url = DOWNLOADS_BASE .  "/" . $file_name;
                 if (FileUtils::exists($file_name)) {
@@ -122,17 +122,7 @@ class DownloadsModel extends BasicModel
                 }
             }
 
-            /*
-            Get the version information for our store releases for
-            Android and the Snap store. Since we can't rely on the
-            file names here, we set them via Constants.php
-            */
-            if ($os['name'] === 'Android') {
-                $version = RELEASE_ANDROID_STORE;
-            }
-
             if ($os['name'] === 'Ubuntu') {
-                $version = RELEASE_SNAP_STORE;
                 $extra_text = '(snap install scummvm)';
             }
 




More information about the Scummvm-git-logs mailing list