diff options
author | Naglfar <naglfar@tilde.institute> | 2021-01-22 12:22:18 +0100 |
---|---|---|
committer | Naglfar <naglfar@tilde.institute> | 2021-01-22 12:22:18 +0100 |
commit | 58f243fd8eaad369573ede8a2cd1f0d5823c4ec4 (patch) | |
tree | 7945c5e16eddd17ea3ff9ffc4678c8cc922a01bb /php/ws-procedures.php | |
parent | f8fc06be595434911e798790a819ed7ac43c9a21 (diff) | |
download | MightyWVMS-master.tar.gz |
Diffstat (limited to 'php/ws-procedures.php')
-rw-r--r-- | php/ws-procedures.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/php/ws-procedures.php b/php/ws-procedures.php index 9a0fce4..fa772d2 100644 --- a/php/ws-procedures.php +++ b/php/ws-procedures.php @@ -4,7 +4,11 @@ $wsdata = file($dpath.'/'.$common, FILE_IGNORE_NEW_LINES); # Language overwritten by the browser preference if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) - $wsdata[4] = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0,2); +{ + $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0,2); + if(file_exists($dpath.$lang)) + $wsdata[4] = $lang; +} $wsdata = array_merge($wsdata, file($dpath.$wsdata[4].'/'.$common, FILE_IGNORE_NEW_LINES)); ?> |