135,13 → 135,13 |
* @param ChampEtendu $champ_etendu |
* @return bool true si la modification a eu lieu |
*/ |
public function modifierParProjet(Array $champs_etendus) { |
public function modifierParProjet(Array $champs_etendus, $langue) { |
if (! $champs_etendus) return TRUE; // le tableau ... vide à été inséré |
// pour chaque champ étendu |
foreach ($champs_etendus['ce'] as $num_champ => $champ_etendu) { |
$modif_ce = "UPDATE {$this->table_champs_etendus} ce join {$this->table_champs_etendus_trad} cet"; |
$modif_ce .= "on field_id = `extended_field_id` and ce.`project` = cet.`project` and ". |
"`language_iso_code` = "; |
$modif_ce .= " on field_id = `extended_field_id` and ce.`project` = cet.`project` and ". |
"`language_iso_code` = { $langue } "; |
// pour chaque valeur de la table extended_field |
foreach ($champs_etendus['ce'][0] as $num_colonne => $colonne) { |
$modif_ce .= "ce.".$num_colonne." = ".Cel::db()->proteger($champ_etendu[$num_colonne]).", "; |