[Scummvm-git-logs] scummvm-web master -> 30fd00126b9c2e5bfcfb7ef091db156cda73d276

Thunderforge noreply at scummvm.org
Tue Jan 11 19:09:49 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:
30fd00126b WEB: Recommended download link


Commit: 30fd00126b9c2e5bfcfb7ef091db156cda73d276
    https://github.com/scummvm/scummvm-web/commit/30fd00126b9c2e5bfcfb7ef091db156cda73d276
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2022-01-11T13:09:44-06:00

Commit Message:
WEB: Recommended download link

When I did refactoring for FileUtils, it seems it resulted in a bad copy/paste.

Changed paths:
    include/Models/DownloadsModel.php


diff --git a/include/Models/DownloadsModel.php b/include/Models/DownloadsModel.php
index ab5c886f..64903dc4 100644
--- a/include/Models/DownloadsModel.php
+++ b/include/Models/DownloadsModel.php
@@ -114,10 +114,9 @@ class DownloadsModel extends BasicModel
                 $url = str_replace('{$version}', $version, $url);
             } else {
                 // Construct the URL and fill in the version
-                $url = DOWNLOADS_BASE . "/" . DOWNLOADS_URL . $download->getURL();
                 $version = $download->getVersion();
                 $file_name = str_replace('{$version}', $version, DOWNLOADS_URL . $download->getURL());
-                $url = DOWNLOADS_BASE . $file_name;
+                $url = DOWNLOADS_BASE .  "/" . $file_name;
                 if (FileUtils::exists($file_name)) {
                     $extra_text = FileUtils::getFileSize($file_name) . " " . FileUtils::getExtension($file_name);
                 }




More information about the Scummvm-git-logs mailing list