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

Thunderforge noreply at scummvm.org
Mon Apr 24 21:05:55 UTC 2023


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:
ccbdca28fa WEB: Redirecting to compatibility page when no game id exists (#287)


Commit: ccbdca28fa49c8ba4194b0b250559e9ec4b72c90
    https://github.com/scummvm/scummvm-web/commit/ccbdca28fa49c8ba4194b0b250559e9ec4b72c90
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2023-04-24T16:05:52-05:00

Commit Message:
WEB: Redirecting to compatibility page when no game id exists (#287)

Part of the migration to using full game ids

Changed paths:
    include/Pages/CompatibilityPage.php


diff --git a/include/Pages/CompatibilityPage.php b/include/Pages/CompatibilityPage.php
index b5e999ba..6d604a8f 100644
--- a/include/Pages/CompatibilityPage.php
+++ b/include/Pages/CompatibilityPage.php
@@ -78,6 +78,12 @@ class CompatibilityPage extends Controller
     public function getGame($target, $version)
     {
         $game = $this->compatibilityModel->getGameData($version, $target);
+        // Redirect to main compatibility page if the requested game doesn't exist
+        if ($game->getId() === null) {
+            // TODO make this more resilient with support for languages and local domains
+            header('Location: https://scummvm.org/compatibility', true, 307);
+            die();
+        }
 
         $this->template = 'components/compatibility_details.tpl';
 




More information about the Scummvm-git-logs mailing list