1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Show only active languages as "my preferred alnguage" options

This commit is contained in:
Hannes Magnusson
2007-10-26 16:51:34 +00:00
parent 11fd919301
commit 9375e2090e

3
my.php
View File

@@ -7,7 +7,8 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
header_nocache();
// Languages array copy and options to list
$langs = $LANGUAGES; $options = array();
$langs = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES);
$options = array();
// We have post data, and it is an available language
if (isset($_POST['my_lang']) && isset($langs[$_POST['my_lang']])) {