Line 65... |
Line 65... |
65 |
if (array_diff_key($this->champs_defaut_valeur, $parametres)) {
|
65 |
if (array_diff_key($this->champs_defaut_valeur, $parametres)) {
|
66 |
$parametres = array_merge($parametres, array_diff_key($this->champs_defaut_valeur, $parametres));
|
66 |
$parametres = array_merge($parametres, array_diff_key($this->champs_defaut_valeur, $parametres));
|
67 |
}
|
67 |
}
|
68 |
$requete_insertion = 'INSERT INTO project_settings '.
|
68 |
$requete_insertion = 'INSERT INTO project_settings '.
|
69 |
'(project_id, '.implode(array_keys($parametres), ', ').') VALUES ("'.$project_id.'", "'.implode($parametres, '", "').'")';
|
69 |
'(project_id, '.implode(array_keys($parametres), ', ').') VALUES ("'.$project_id.'", "'.implode($parametres, '", "').'")';
|
- |
|
70 |
$requete_insertion = str_replace('"CURRENT_TIMESTAMP"', 'CURRENT_TIMESTAMP', $requete_insertion);
|
70 |
$resultat_ajout = Cel::db()->executer($requete_insertion);
|
71 |
$resultat_ajout = Cel::db()->executer($requete_insertion);
|
71 |
$retour = true;
|
72 |
$retour = true;
|
72 |
if ($resultat_ajout === false) {
|
73 |
if ($resultat_ajout === false) {
|
73 |
$retour = false;
|
74 |
$retour = false;
|
74 |
$msg = "Erreur de creation d'un widget : $resultat_ajout";
|
75 |
$msg = "Erreur de creation d'un widget : $resultat_ajout";
|
75 |
$this->logger('CEL_bugs', $msg);
|
76 |
$this->logger('CEL_bugs', $msg);
|