Line 170... |
Line 170... |
170 |
|
170 |
|
171 |
/**
|
171 |
/**
|
172 |
* Renvoie les champs étendus d'un projet
|
172 |
* Renvoie les champs étendus d'un projet
|
173 |
*/
|
173 |
*/
|
- |
|
174 |
public function consulterProjetChampsEtendus($projet = "", $langue = 'fr') {
|
- |
|
175 |
if ($projet !== "") {
|
- |
|
176 |
$requeteProjetType = "SELECT type FROM `project_settings` WHERE `project` = '".$projet."';";
|
- |
|
177 |
$resultat = Cel::db()->executerRequete($requeteProjetType);
|
- |
|
178 |
if ($resultat == array() || $resultat[0]['type'] = "") {
|
- |
|
179 |
$requeteProjet = " AND ce.project = '".$projet."' AND cet.project = '".$projet."' ";
|
- |
|
180 |
} else {
|
- |
|
181 |
$type = $resultat[0]['type'];
|
- |
|
182 |
$requeteProjet = " AND ce.project = '".$type."' AND cet.project = '".$type."' ";
|
- |
|
183 |
}
|
- |
|
184 |
} else {
|
- |
|
185 |
$requeteProjet = "";
|
174 |
public function consulterProjetChampsEtendus($projet = "", $langue = 'fr') {
|
186 |
}
|
175 |
$groupes = array();
|
187 |
$groupes = array();
|
176 |
$requete = "SELECT {$this->liste_champs} ".
|
188 |
$requete = "SELECT {$this->liste_champs} ".
|
177 |
"FROM {$this->table_champs_etendus} ce ".
|
189 |
"FROM {$this->table_champs_etendus} ce ".
|
178 |
"INNER JOIN {$this->table_champs_etendus_trad} cet ON ce.field_id = cet.extended_field_id AND ce.project = cet.project ".
|
190 |
"INNER JOIN {$this->table_champs_etendus_trad} cet ON ce.field_id = cet.extended_field_id AND ce.project = cet.project ".
|
179 |
"WHERE cet.language_iso_code = '".$langue."' ";
|
- |
|
180 |
if ($projet !== "") $requete .= " AND ce.project = '".$projet."' AND cet.project = '".$projet."' ";
|
191 |
"WHERE cet.language_iso_code = '".$langue."' ".$requeteProjet;
|
181 |
$requete .= ' -- '.__FILE__.':'.__LINE__; //echo $requete;exit;
|
192 |
$requete .= ' -- '.__FILE__.':'.__LINE__; //echo $requete;exit;
|
Line 182... |
Line 193... |
182 |
$groupes_champs = Cel::db()->executerRequete($requete);
|
193 |
$groupes_champs = Cel::db()->executerRequete($requete);
|
183 |
|
194 |
|