Subversion Repositories eFlore/Applications.cel

Rev

Rev 3887 | Rev 3889 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3887 Rev 3888
Line 139... Line 139...
139
	    if (! $champs_etendus) return TRUE; // le tableau ... vide à été inséré
139
	    if (! $champs_etendus) return TRUE; // le tableau ... vide à été inséré
140
	    // pour chaque champ étendu
140
	    // pour chaque champ étendu
141
	    foreach ($champs_etendus['ce'] as $num_champ => $champ_etendu) {
141
	    foreach ($champs_etendus['ce'] as $num_champ => $champ_etendu) {
142
	        $modif_ce = "UPDATE {$this->table_champs_etendus} ce join {$this->table_champs_etendus_trad} cet";
142
	        $modif_ce = "UPDATE {$this->table_champs_etendus} ce join {$this->table_champs_etendus_trad} cet";
143
	        $modif_ce .= " on field_id = `extended_field_id` and ce.`project` = cet.`project` and ".
143
	        $modif_ce .= " on field_id = `extended_field_id` and ce.`project` = cet.`project` and ".
144
	   	        "`language_iso_code` = ".Cel::db()->proteger($langue)." ";
144
	   	        "`language_iso_code` = ".Cel::db()->proteger($langue)." SET ";
145
	        // pour chaque valeur de la table extended_field
145
	        // pour chaque valeur de la table extended_field
146
	        foreach ($champs_etendus['ce'][0] as $num_colonne => $colonne) {
146
	        foreach ($champs_etendus['ce'][0] as $num_colonne => $colonne) {
147
	            $modif_ce .= "ce.".$num_colonne." = ".Cel::db()->proteger($champ_etendu[$num_colonne]).", ";
147
	            $modif_ce .= "ce.".$num_colonne." = ".Cel::db()->proteger($champ_etendu[$num_colonne]).", ";
148
	        }
148
	        }
149
	        // pour chaque valeur de la table extended_field_traduction
149
	        // pour chaque valeur de la table extended_field_traduction
150
	        foreach ($champs_etendus['cet'][0] as $num_colonne_t => $colonne_t) {
150
	        foreach ($champs_etendus['cet'][0] as $num_colonne_t => $colonne_t) {
151
	            $modif_ce .= "cet.".$num_colonne_t." = ".Cel::db()->proteger($champs_etendus[$cet][$num_champ][$num_colonne_t]).", ";
151
	            $modif_ce .= "cet.".$num_colonne_t." = ".Cel::db()->proteger($champs_etendus[$cet][$num_champ][$num_colonne_t]).", ";
152
	        }
152
	        }
153
	        $modif_ce = rtrim($modif_ce, ", ");
153
	        $modif_ce = rtrim($modif_ce, ", ");
154
	        $modif_ce .= " WHERE  ce.{$this->champ_id} = ".Cel::db()->proteger($champ_etendu['field_id']);
154
	        $modif_ce .= " WHERE  ce.{$this->champ_id} = ".Cel::db()->proteger($champ_etendu['field_id']);
155
	        $modif_ce .= " AND project = ".Cel::db()->proteger($champ_etendu['project']).";";
155
	        $modif_ce .= " AND ce.project = ".Cel::db()->proteger($champ_etendu['project']).";";
156
	        $modif = Cel::db()->executer($modif_ce);
156
	        $modif = Cel::db()->executer($modif_ce);
157
	    }
157
	    }
158
	    return ($modif !== false);
158
	    return ($modif !== false);
159
	}
159
	}