mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 13:59:29 +00:00
Fix comment creation date
This commit is contained in:
parent
0d0878daa9
commit
1ffa215d4d
@ -25,6 +25,7 @@ class Comments {
|
||||
"ID_texte" => $comment->get_postID(),
|
||||
"ID_personne" => $comment->get_userID(),
|
||||
"date_envoi" => mysql_date(),
|
||||
"time_insert" => time(),
|
||||
"commentaire" => $comment->has_content() ? $comment->get_content() : "",
|
||||
"image_commentaire" => $comment->has_img_path() ? "file:".$comment->get_img_path() : ""
|
||||
);
|
||||
@ -297,7 +298,7 @@ class Comments {
|
||||
$comment->set_id($data["ID"]);
|
||||
$comment->set_userID($data["ID_personne"]);
|
||||
$comment->set_postID($data["ID_texte"]);
|
||||
$comment->set_time_sent(strtotime($data["date_envoi"]));
|
||||
$comment->set_time_sent($data["time_insert"] == null ? strtotime($data["date_envoi"]) : $data["time_insert"]);
|
||||
$comment->set_content($data["commentaire"]);
|
||||
|
||||
//Check for image
|
||||
|
@ -66,6 +66,7 @@ CREATE TABLE `commentaires` (
|
||||
`ID_personne` int(11) NOT NULL,
|
||||
`ID_texte` int(11) NOT NULL,
|
||||
`date_envoi` datetime NOT NULL,
|
||||
`time_insert` int(11) DEFAULT NULL,
|
||||
`commentaire` varchar(255) NOT NULL,
|
||||
`image_commentaire` longtext NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
|
Loading…
Reference in New Issue
Block a user