114,7 → 114,7 |
private function construireRequeteInsertionImage($informations_image) { |
$infos = array( |
'date_creation' => 'NOW()', |
'date_modification' => 'NULL'); |
'date_modification' => 'NOW()'); |
foreach ($informations_image as $champ => $valeur) { |
$infos[$champ] = is_null($valeur) ? 'NULL' : Cel::db()->proteger($valeur); |
} |
167,21 → 167,22 |
* @return string une sous chaine sql utilisable dans une requete de type UPPDATE table SET valeur1=champ1 ... |
*/ |
private function construireRequeteMajMetaDonnees($valeurs_metadonnees) { |
$requete_maj_champs = ''; |
$champs_a_ignorer = array('id_image'); |
$champs_maj = array('date_modification = NOW()'); |
$champs_a_ignorer = array('id_image', 'date_modification'); |
foreach ($valeurs_metadonnees as $champ => $valeur) { |
if (!in_array($champ,$champs_a_ignorer)) { |
if ($champ == 'date_prise_de_vue' && trim($valeur != '')) { |
if (!in_array($champ, $champs_a_ignorer)) { |
if ($champ == 'date_prise_de_vue' && trim($valeur) != '') { |
$date_tab = explode('/', $valeur) ; |
$date = $date_tab[2].'-'.$date_tab[1].'-'.$date_tab[0] ; |
$requete_maj_champs .= $champ.' = '.Cel::db()->proteger($date).' , ' ; |
$dateP = Cel::db()->proteger($date); |
$champs_maj[] = "$champ = $dateP"; |
} else { |
$requete_maj_champs .= $champ.' = '.Cel::db()->proteger($valeur).' , ' ; |
$valeurP = Cel::db()->proteger($valeur); |
$champs_maj[] = "$champ = $valeurP"; |
} |
} |
} |
$requete_maj_champs = rtrim($requete_maj_champs, ' , ') ; |
return $requete_maj_champs; |
return implode(', ', $champs_maj); |
} |
|
public function supprimerImageParOrdre($id_utilisateur, $ordre_images) { |
Property changes: |
Added: svnkit:entry:sha1-checksum |
+5a59fd56b54b0de38897e58593678a1ea89405fa |
\ No newline at end of property |