Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3885 → Rev 3886

/trunk/jrest/bibliotheque/GestionChampsEtendus2.php
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]).", ";
/trunk/jrest/services/CelWidgetManager.php
117,7 → 117,7
if (isset($params['champs-supp'])) {
$gestionchamps = new GestionChampsEtendus2($this->config);
$champs = $this->traiterCorrespondanceChampsEtendusInterfaceBD($params); //var_dump($champs);exit;
$liste = $gestionchamps->modifierParProjet($champs);
$liste = $gestionchamps->modifierParProjet($champs, $params['langue']);
unset($params['champs-supp']);
}
$manager = new GestionWidget($this->config);