Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3537 → Rev 3538

/trunk/jrest/bibliotheque/GestionChampsEtendus2.php
19,7 → 19,7
private $table_champs_etendus = "extended_field";
private $table_champs_etendus_trad = "extendedfield_translation";
private $champ_id = "field_id";
private $liste_champs = "ce.`project`, ce.field_id, ce.`data_type`, ce.`is_mandatory`, ce.`unit`, ".
private $liste_champs = "ce.`id`, ce.`project`, ce.field_id, ce.`data_type`, ce.`is_mandatory`, ce.`unit`, ".
"cet.extended_field_id, cet.`label`, cet.`description`, cet.`default_value`, cet.`error_message`, cet.`language_iso_code`, cet.`help` ";
 
215,7 → 215,8
);
}
$infos_groupe['champs'][] = array(
$infos_groupe['champs'][$groupe_champ['ce.field_id']] = array(
'id' => $groupe_champ['ce.id'],
'cle' => $groupe_champ['ce.field_id'],
'label' => $groupe_champ['cet.`label`'],
'type' => $groupe_champ['type_champ'],
240,7 → 241,7
* Renvoie le catalogue des champs étendus
*/
public function consulterCatalogueChampsEtendusPredefinis($ordonner_par_cle = false, $groupe = "") {
$requete = 'SELECT ce.field_id as cle, cet.`label` as label, "0" as invisible, "0" as prive '.
$requete = 'SELECT ce.id as id, ce.field_id as cle, cet.`label` as label, "0" as invisible, "0" as prive '.
"FROM {$this->table_champs_etendus} ce ".
"INNER JOIN {$this->table_champs_etendus_trad} cet ON ce.field_id = cet.extended_field_id ";
if ($groupe !== "") $requete .= " WHERE project = ".$groupe;
251,6 → 252,7
if ($catalogue != false) {
foreach ($catalogue as $champ) {
$champ_fmt = array(
'id' => $champ['id'],
'cle' => $champ['cle'],
'label' => $champ['label'],
'options' => array(