Ajout du dossier receiveds au git, fix du scheduleds update et create, ajout default 0 sur le scheduleds:progress
This commit is contained in:
parent
1dda3958d9
commit
6861214501
|
@ -165,7 +165,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$db->createScheduleds($date, $content))
|
if (!$db->insertIntoTable('scheduleds', ['at' => $date, 'content' => $content, 'progress' => false]))
|
||||||
{
|
{
|
||||||
if (!$api)
|
if (!$api)
|
||||||
{
|
{
|
||||||
|
@ -259,7 +259,12 @@
|
||||||
//Si la date fournie est passée, on la change pour dans 2 minutes
|
//Si la date fournie est passée, on la change pour dans 2 minutes
|
||||||
$objectDate = DateTime::createFromFormat('Y-m-d H:i', $date);
|
$objectDate = DateTime::createFromFormat('Y-m-d H:i', $date);
|
||||||
|
|
||||||
$db->updateTableWhere('scheduleds', ['content' => $scheduled['content'], 'date' => $date], ['id' => $id_scheduled]); //On met à jour le sms
|
if (!$db->updateTableWhere('scheduleds', ['content' => $scheduled['content'], 'at' => $date], ['id' => $id_scheduled]))
|
||||||
|
{
|
||||||
|
$_SESSION['errormessage'] = 'Impossible de mettre à jour le SMS numéro ' . $scheduled['id'] . '.';
|
||||||
|
header('Location: ' . $this->generateUrl('scheduleds', 'showAll'));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$db->deleteScheduleds_numbersForScheduled($id_scheduled); //On supprime tous les numéros pour ce SMS
|
$db->deleteScheduleds_numbersForScheduled($id_scheduled); //On supprime tous les numéros pour ce SMS
|
||||||
$db->deleteScheduleds_contactsForScheduled($id_scheduled); //On supprime tous les contacts pour ce SMS
|
$db->deleteScheduleds_contactsForScheduled($id_scheduled); //On supprime tous les contacts pour ce SMS
|
||||||
|
|
|
@ -27,7 +27,7 @@ CREATE TABLE scheduleds
|
||||||
id INT NOT NULL AUTO_INCREMENT,
|
id INT NOT NULL AUTO_INCREMENT,
|
||||||
at DATETIME NOT NULL,
|
at DATETIME NOT NULL,
|
||||||
content VARCHAR(1000) NOT NULL,
|
content VARCHAR(1000) NOT NULL,
|
||||||
progress BOOLEAN NOT NULL,
|
progress BOOLEAN NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue