Fix: Inconsistency arrays into php function

This commit is contained in:
Laurent Destailleur 2013-06-19 23:46:18 +02:00
parent 5667fceba8
commit 7f660302e2

View File

@ -759,6 +759,7 @@ class Translate
{ {
$this->load("dict"); $this->load("dict");
$label=array(); $label=array();
foreach($this->cache_currencies as $key => $val) $label[$key]=$val['label'];
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
@ -772,9 +773,9 @@ class Translate
$label[$obj->code_iso] = $this->cache_currencies[$obj->code_iso]['label']; $label[$obj->code_iso] = $this->cache_currencies[$obj->code_iso]['label'];
$i++; $i++;
} }
//print count($label).' '.count($this->cache_currencies);
array_multisort($label, SORT_ASC, $this->cache_currencies); array_multisort($label, SORT_ASC, $this->cache_currencies);
//var_dump($this->cache_currencies); $this->cache_currencies is now sorted onto label
return $num; return $num;
} }
else else