[Scummvm-cvs-logs] scummvm-web master -> d3af8ab3fb1b31d07e5bca06a64625e1f47e5f7c

csnover csnover at users.noreply.github.com
Sun Apr 24 18:17:43 CEST 2016


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:
d3af8ab3fb WEB: Check $_COOKIE['lang'] explicitly


Commit: d3af8ab3fb1b31d07e5bca06a64625e1f47e5f7c
    https://github.com/scummvm/scummvm-web/commit/d3af8ab3fb1b31d07e5bca06a64625e1f47e5f7c
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-04-24T16:16:51Z

Commit Message:
WEB: Check $_COOKIE['lang'] explicitly

PHP documentation on $_REQUEST says it includes cookies by default,
but PHP documentation on request_order actually says it does not.
The request_order documentation is the right documentation.

Changed paths:
    index.php



diff --git a/index.php b/index.php
index 75c9cb7..78514c6 100644
--- a/index.php
+++ b/index.php
@@ -32,6 +32,8 @@ function get_preferred_languages() {
 
 if (!empty($_REQUEST['lang'])) {
   $lang = $_REQUEST['lang'];
+} elseif (!empty($_COOKIE['lang'])) {
+  $lang = $_COOKIE['lang'];
 } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
   foreach (get_preferred_languages() as $candidate) {
     $candidate_major = current(explode('-', $candidate, 1));






More information about the Scummvm-git-logs mailing list