Get informations about survey

This commit is contained in:
Pierre
2018-01-04 10:29:07 +01:00
parent f1cbb8dc8a
commit 96b4f6b99e
3 changed files with 184 additions and 1 deletions

View File

@ -188,6 +188,14 @@ class Posts {
$info["link_description"] = $src["description_page"];
$info["link_image"] = $src["image_page"];
//Survey specific
if($info['kind'] == "survey"){
$info["data_survey"] = CS::get()->components->survey->get_infos($info['ID']);
}
else {
$info["data_survey"] = null;
}
//Get informations about likes
$info["likes"] = CS::get()->components->likes->count($info["ID"], Likes::LIKE_POST);
$info["userlike"] = user_signed_in() ? CS::get()->components->likes->is_liking(userID, $info["ID"], Likes::LIKE_POST) : false;