Added check if GET['langId'] exists
Dieser Commit ist enthalten in:
Ursprung
080e056811
Commit
76b2553bf2
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
$country = $_GET['langId'];
|
||||
$language = isset($_GET['langId']) ? $_GET['langId'] : '';
|
||||
|
||||
if (preg_match('/^[A-Z0-9_]+\z/i', $country)) {
|
||||
if (preg_match('/^[A-Z0-9_]+\z/i', $language)) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
$languageDir = realpath(dirname(__FILE__) . '/../application/language');
|
||||
$image = $languageDir . DS . $country . DS . 'flag.gif';
|
||||
$image = $languageDir . DS . $language . DS . 'flag.gif';
|
||||
|
||||
if (file_exists($image)) {
|
||||
header('Content-Type: image/gif');
|
||||
|
|
Laden …
In neuem Issue referenzieren