Commit 102e4882 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

Change diviner language bug resolution

parent 9efdde30
......@@ -10,8 +10,9 @@ $db->query($sql);
$usedIsos = array();
while ($usedIso = $db->fetch_assoc()) {
$language = $usedIso['langue'];
$usedIsos[$language] = $iso[$language];
$code = $usedIso['langue'];
$usedIsos[$code] = $iso[$code];
}
sort($usedIsos);
//sort($usedIsos);
//removes the associations
\ No newline at end of file
......@@ -11,7 +11,7 @@ include('./sys/load_used_iso.php');
<select name="chooseLang" size="1" id="chooseLang" onchange="saveLangue()">
<?php
foreach ($usedIsos as $short => $long) {
echo "<option value=" . $usedIso ;
echo "<option value='" . $short."'" ;
if(isset($_SESSION["langDevin"]))
{
if(strcmp($_SESSION["langDevin"],$short) == 0){ echo " selected"; }
......@@ -34,7 +34,7 @@ include('./sys/load_used_iso.php');
<script>
function saveLangue() {
$.post("devinLangue.php","lang="+$('#chooseLang option:selected').val(),function (response){void window.location.reload();
$.post("devinLangue.php","lang="+$('#chooseLang').val(),function (response){void window.location.reload();
});
}
</script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment