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

Mataniko mataniko at gmail.com
Wed Dec 30 01:48:15 UTC 2020


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:
aa19570df5 WEB: Fix links to translations when page starts with lang code


Commit: aa19570df58845020c0e0c1706f6939a5911421f
    https://github.com/scummvm/scummvm-web/commit/aa19570df58845020c0e0c1706f6939a5911421f
Author: Mataniko (mataniko at gmail.com)
Date: 2020-12-29T20:47:49-05:00

Commit Message:
WEB: Fix links to translations when page starts with lang code

Changed paths:
    include/Controller.php


diff --git a/include/Controller.php b/include/Controller.php
index 256955a5..5345c159 100644
--- a/include/Controller.php
+++ b/include/Controller.php
@@ -69,7 +69,7 @@ class Controller
 
         // Construct lang URL
         $langs = join("|", array_keys($available_languages));
-        $pageurl = preg_replace("/\/($langs)/i", '', $_SERVER['REQUEST_URI']);
+        $pageurl = preg_replace("/\/($langs)\/?/i", '/', $_SERVER['REQUEST_URI']);
         /* Check RTL */
         $rtl = $this->isRtl($available_languages[$lang]);
 




More information about the Scummvm-git-logs mailing list