44,9 → 44,6 |
'depart' => 0, |
'limite' => 100 |
); |
|
protected $champ_tri = 'code_langue'; |
protected $direction_tri = 'asc'; |
|
/** |
* Precise la contenance plus ou moins précise du tableau à retourner : |
355,7 → 352,7 |
$resultat_json[$tab['num_nom_vernaculaire']] = $this->afficherChampsSupplementairesOntologie($tab); |
} |
} |
uasort($resultat_json, array($this,'trierLigneTableau')); |
|
$table_retour_json['resultat'] = $resultat_json; |
return $table_retour_json; |
} |
396,15 → 393,6 |
return $resultat; |
} |
|
private function trierLigneTableau($a, $b) { |
if ($a[$this->champ_tri] == $b[$this->champ_tri]) return 0; |
if($this->direction_tri == 'asc') { |
return ($a[$this->champ_tri] < $b[$this->champ_tri]) ? -1 : 1; |
} else { |
return ($a[$this->champ_tri] > $b[$this->champ_tri]) ? -1 : 1; |
} |
} |
|
// formatage de la reponse /id ss la forme |
// id, nom_vernaculaire, attributions |
// langue |