Subversion Repositories eFlore/Applications.cel

Rev

Rev 2131 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2131 Rev 2150
Line 178... Line 178...
178
	private function construireRequeteMajMetaDonnees($valeurs_metadonnees) {
178
	private function construireRequeteMajMetaDonnees($valeurs_metadonnees) {
179
		$requete_maj_champs = '';
179
		$requete_maj_champs = '';
180
		$champs_a_ignorer = array('id_image');
180
		$champs_a_ignorer = array('id_image');
181
		foreach ($valeurs_metadonnees as $champ  => $valeur) {
181
		foreach ($valeurs_metadonnees as $champ  => $valeur) {
182
			if (!in_array($champ,$champs_a_ignorer)) {
182
			if (!in_array($champ,$champs_a_ignorer)) {
183
				if ($champ == 'date_prise_de_vue') {
183
				if ($champ == 'date_prise_de_vue' && trim($valeur != "")) {
184
					$date_tab = explode('/',$valeur) ;
184
					$date_tab = explode('/',$valeur) ;
185
					$date = $date_tab[2].'-'.$date_tab[1].'-'.$date_tab[0] ;
185
					$date = $date_tab[2].'-'.$date_tab[1].'-'.$date_tab[0] ;
186
					$requete_maj_champs .= $champ.' = '.Cel::db()->proteger($date).' , ' ;
186
					$requete_maj_champs .= $champ.' = '.Cel::db()->proteger($date).' , ' ;
187
				} else {
187
				} else {
188
					$requete_maj_champs .= $champ.' = '.Cel::db()->proteger($valeur).' , ' ;
188
					$requete_maj_champs .= $champ.' = '.Cel::db()->proteger($valeur).' , ' ;