mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Improve posts datation
This commit is contained in:
parent
1ffa215d4d
commit
9731f3b632
@ -425,6 +425,7 @@ class Posts {
|
|||||||
"ID_personne" => $post_user_id,
|
"ID_personne" => $post_user_id,
|
||||||
"ID_amis" => $post_friend_id,
|
"ID_amis" => $post_friend_id,
|
||||||
"date_envoi" => mysql_date(),
|
"date_envoi" => mysql_date(),
|
||||||
|
"time_insert" => time(),
|
||||||
"texte" => $post->has_content() ? $post->get_content() : "",
|
"texte" => $post->has_content() ? $post->get_content() : "",
|
||||||
"niveau_visibilite" => $post->get_visibility_level(),
|
"niveau_visibilite" => $post->get_visibility_level(),
|
||||||
"type" => $post_kind_db,
|
"type" => $post_kind_db,
|
||||||
@ -684,7 +685,7 @@ class Posts {
|
|||||||
$post->set_id($entry["ID"]);
|
$post->set_id($entry["ID"]);
|
||||||
$post->set_userID($entry["ID_amis"] == 0 ? $entry["ID_personne"] : $entry["ID_amis"]);
|
$post->set_userID($entry["ID_amis"] == 0 ? $entry["ID_personne"] : $entry["ID_amis"]);
|
||||||
$post->set_user_page_id($entry["ID_personne"]);
|
$post->set_user_page_id($entry["ID_personne"]);
|
||||||
$post->set_time_sent(strtotime($entry["date_envoi"]));
|
$post->set_time_sent($entry["time_insert"] == null ? strtotime($entry["date_envoi"]) : $entry["time_insert"]);
|
||||||
$post->set_content($entry["texte"]);
|
$post->set_content($entry["texte"]);
|
||||||
$post->set_visibility_level($entry["niveau_visibilite"]);
|
$post->set_visibility_level($entry["niveau_visibilite"]);
|
||||||
$post->set_kind($this::POSTS_DB_TYPES[$entry["type"]]);
|
$post->set_kind($this::POSTS_DB_TYPES[$entry["type"]]);
|
||||||
|
@ -421,6 +421,7 @@ CREATE TABLE `texte` (
|
|||||||
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`ID_personne` int(11) NOT NULL,
|
`ID_personne` int(11) NOT NULL,
|
||||||
`date_envoi` datetime NOT NULL,
|
`date_envoi` datetime NOT NULL,
|
||||||
|
`time_insert` int(11) DEFAULT NULL,
|
||||||
`texte` text NOT NULL,
|
`texte` text NOT NULL,
|
||||||
`ID_amis` int(11) NOT NULL DEFAULT '0',
|
`ID_amis` int(11) NOT NULL DEFAULT '0',
|
||||||
`niveau_visibilite` varchar(255) NOT NULL DEFAULT '1',
|
`niveau_visibilite` varchar(255) NOT NULL DEFAULT '1',
|
||||||
|
Loading…
Reference in New Issue
Block a user