Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 278 → Rev 279

/trunk/services/modules/0.1/nvjfl/NomsVernaculaires.php
44,6 → 44,9
'depart' => 0,
'limite' => 100
);
protected $champ_tri = 'code_langue';
protected $direction_tri = 'asc';
 
/**
* Precise la contenance plus ou moins précise du tableau à retourner :
352,7 → 355,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;
}
393,6 → 396,15
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