2021-02-08 16:24:58 +01:00
|
|
|
|
// swad_timeline_favourite.c: social timeline favourites
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
SWAD (Shared Workspace At a Distance),
|
|
|
|
|
is a web platform developed at the University of Granada (Spain),
|
|
|
|
|
and used to support university teaching.
|
|
|
|
|
|
|
|
|
|
This file is part of SWAD core.
|
2021-02-09 12:43:45 +01:00
|
|
|
|
Copyright (C) 1999-2021 Antonio Ca<EFBFBD>as Vargas
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Affero General 3 License as
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/*********************************** Headers *********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "swad_database.h"
|
|
|
|
|
#include "swad_global.h"
|
|
|
|
|
#include "swad_timeline.h"
|
2021-02-27 16:30:41 +01:00
|
|
|
|
#include "swad_timeline_database.h"
|
2021-02-08 16:24:58 +01:00
|
|
|
|
#include "swad_timeline_favourite.h"
|
2021-02-21 21:30:06 +01:00
|
|
|
|
#include "swad_timeline_form.h"
|
2021-02-11 17:45:16 +01:00
|
|
|
|
#include "swad_timeline_notification.h"
|
2021-02-11 13:10:08 +01:00
|
|
|
|
#include "swad_timeline_publication.h"
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/****************************** Public constants *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************************* Private constants and types ***********************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************** External global variables from others modules ****************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
extern struct Globals Gbl;
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************************* Private global variables **************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Private prototypes ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2021-02-11 00:58:53 +01:00
|
|
|
|
static void TL_Fav_FavNote (struct TL_Not_Note *Not);
|
|
|
|
|
static void TL_Fav_UnfNote (struct TL_Not_Note *Not);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
static void TL_Fav_FavComm (struct TL_Com_Comment *Com);
|
|
|
|
|
static void TL_Fav_UnfComm (struct TL_Com_Comment *Com);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/********************** Mark/unmark a note as favourite **********************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void TL_Fav_ShowAllFaversNoteUsr (void)
|
|
|
|
|
{
|
|
|
|
|
/***** Get user whom profile is displayed *****/
|
|
|
|
|
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
|
|
|
|
|
|
|
|
|
/***** Show all favers *****/
|
|
|
|
|
TL_Fav_ShowAllFaversNoteGbl ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TL_Fav_ShowAllFaversNoteGbl (void)
|
|
|
|
|
{
|
2021-02-11 00:58:53 +01:00
|
|
|
|
struct TL_Not_Note Not;
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Get data of note *****/
|
2021-02-11 00:58:53 +01:00
|
|
|
|
Not.NotCod = TL_Not_GetParamNotCod ();
|
|
|
|
|
TL_Not_GetDataOfNoteByCod (&Not);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Write HTML inside DIV with form to fav/unfav *****/
|
2021-03-03 10:02:42 +01:00
|
|
|
|
TL_Usr_PutIconFavSha (TL_Usr_FAV_UNF_NOTE,
|
|
|
|
|
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
|
|
|
|
TL_Usr_SHOW_ALL_USRS);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TL_Fav_FavNoteUsr (void)
|
|
|
|
|
{
|
|
|
|
|
/***** Get user whom profile is displayed *****/
|
|
|
|
|
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
|
|
|
|
|
|
|
|
|
/***** Mark note as favourite *****/
|
|
|
|
|
TL_Fav_FavNoteGbl ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TL_Fav_FavNoteGbl (void)
|
|
|
|
|
{
|
2021-02-11 00:58:53 +01:00
|
|
|
|
struct TL_Not_Note Not;
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Mark note as favourite *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
TL_Fav_FavNote (&Not);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Write HTML inside DIV with form to unfav *****/
|
2021-03-03 10:02:42 +01:00
|
|
|
|
TL_Usr_PutIconFavSha (TL_Usr_FAV_UNF_NOTE,
|
|
|
|
|
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
|
|
|
|
TL_Usr_SHOW_FEW_USRS);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TL_Fav_UnfNoteUsr (void)
|
|
|
|
|
{
|
|
|
|
|
/***** Get user whom profile is displayed *****/
|
|
|
|
|
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
|
|
|
|
|
|
|
|
|
/***** Unfav a note previously marked as favourite *****/
|
|
|
|
|
TL_Fav_UnfNoteGbl ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TL_Fav_UnfNoteGbl (void)
|
|
|
|
|
{
|
2021-02-11 00:58:53 +01:00
|
|
|
|
struct TL_Not_Note Not;
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Stop marking as favourite a previously favourited note *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
TL_Fav_UnfNote (&Not);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Write HTML inside DIV with form to fav *****/
|
2021-03-03 10:02:42 +01:00
|
|
|
|
TL_Usr_PutIconFavSha (TL_Usr_FAV_UNF_NOTE,
|
|
|
|
|
Not.NotCod,Not.UsrCod,Not.NumFavs,
|
|
|
|
|
TL_Usr_SHOW_FEW_USRS);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-02-11 00:58:53 +01:00
|
|
|
|
static void TL_Fav_FavNote (struct TL_Not_Note *Not)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
|
|
|
|
long OriginalPubCod;
|
|
|
|
|
|
2021-03-02 20:36:20 +01:00
|
|
|
|
/***** Get data of note *****/
|
|
|
|
|
Not->NotCod = TL_Not_GetParamNotCod ();
|
|
|
|
|
TL_Not_GetDataOfNoteByCod (Not);
|
|
|
|
|
|
|
|
|
|
/***** Do some checks *****/
|
|
|
|
|
if (!TL_Usr_CheckICanFavSha (Not->NotCod,Not->UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
return;
|
|
|
|
|
|
2021-03-02 13:45:56 +01:00
|
|
|
|
/***** Trivial check: Have I faved this note? *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
if (TL_Usr_CheckIfFavedSharedByUsr (TL_Usr_FAV_UNF_NOTE,Not->NotCod,
|
|
|
|
|
Gbl.Usrs.Me.UsrDat.UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/***** Mark note as favourite in database *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
TL_DB_MarkAsFav (TL_Usr_FAV_UNF_NOTE,Not->NotCod);
|
2021-03-01 22:31:56 +01:00
|
|
|
|
|
|
|
|
|
/***** Update number of times this note is favourited *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
Not->NumFavs = TL_DB_GetNumFavers (TL_Usr_FAV_UNF_NOTE,
|
|
|
|
|
Not->NotCod,Not->UsrCod);
|
2021-03-01 22:31:56 +01:00
|
|
|
|
|
|
|
|
|
/***** Create notification about favourite post
|
|
|
|
|
for the author of the post *****/
|
|
|
|
|
OriginalPubCod = TL_DB_GetPubCodOfOriginalNote (Not->NotCod);
|
|
|
|
|
if (OriginalPubCod > 0)
|
|
|
|
|
TL_Ntf_CreateNotifToAuthor (Not->UsrCod,OriginalPubCod,
|
|
|
|
|
Ntf_EVENT_TIMELINE_FAV);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-02-11 00:58:53 +01:00
|
|
|
|
static void TL_Fav_UnfNote (struct TL_Not_Note *Not)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
|
|
|
|
long OriginalPubCod;
|
|
|
|
|
|
2021-03-02 20:36:20 +01:00
|
|
|
|
/***** Get data of note *****/
|
|
|
|
|
Not->NotCod = TL_Not_GetParamNotCod ();
|
|
|
|
|
TL_Not_GetDataOfNoteByCod (Not);
|
|
|
|
|
|
|
|
|
|
/***** Do some checks *****/
|
|
|
|
|
if (!TL_Usr_CheckICanFavSha (Not->NotCod,Not->UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
return;
|
|
|
|
|
|
2021-03-02 13:45:56 +01:00
|
|
|
|
/***** Trivial check: Have I faved this note? *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
if (!TL_Usr_CheckIfFavedSharedByUsr (TL_Usr_FAV_UNF_NOTE,Not->NotCod,
|
|
|
|
|
Gbl.Usrs.Me.UsrDat.UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/***** Delete the mark as favourite from database *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
TL_DB_UnmarkAsFav (TL_Usr_FAV_UNF_NOTE,Not->NotCod);
|
2021-03-01 22:31:56 +01:00
|
|
|
|
|
|
|
|
|
/***** Update number of times this note is favourited *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
Not->NumFavs = TL_DB_GetNumFavers (TL_Usr_FAV_UNF_NOTE,
|
|
|
|
|
Not->NotCod,Not->UsrCod);
|
2021-03-01 22:31:56 +01:00
|
|
|
|
|
|
|
|
|
/***** Mark possible notifications on this note as removed *****/
|
|
|
|
|
OriginalPubCod = TL_DB_GetPubCodOfOriginalNote (Not->NotCod);
|
|
|
|
|
if (OriginalPubCod > 0)
|
|
|
|
|
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,OriginalPubCod);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2021-02-23 09:17:09 +01:00
|
|
|
|
/********************* Mark/unmark a comment as favourite ********************/
|
2021-02-08 16:24:58 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void TL_Fav_ShowAllFaversComUsr (void)
|
|
|
|
|
{
|
|
|
|
|
/***** Get user whom profile is displayed *****/
|
|
|
|
|
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
|
|
|
|
|
|
|
|
|
/***** Show all favers *****/
|
|
|
|
|
TL_Fav_ShowAllFaversComGbl ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TL_Fav_ShowAllFaversComGbl (void)
|
|
|
|
|
{
|
2021-02-11 00:58:53 +01:00
|
|
|
|
struct TL_Com_Comment Com;
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Get data of comment *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
Med_MediaConstructor (&Com.Content.Media);
|
2021-02-11 13:10:08 +01:00
|
|
|
|
Com.PubCod = TL_Pub_GetParamPubCod ();
|
2021-02-11 00:58:53 +01:00
|
|
|
|
TL_Com_GetDataOfCommByCod (&Com);
|
2021-02-10 19:53:57 +01:00
|
|
|
|
Med_MediaDestructor (&Com.Content.Media);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Write HTML inside DIV with form to fav/unfav *****/
|
2021-03-03 10:02:42 +01:00
|
|
|
|
TL_Usr_PutIconFavSha (TL_Usr_FAV_UNF_COMM,
|
|
|
|
|
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
|
|
|
|
TL_Usr_SHOW_ALL_USRS);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
void TL_Fav_FavCommUsr (void)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
|
|
|
|
/***** Get user whom profile is displayed *****/
|
|
|
|
|
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
|
|
|
|
|
|
|
|
|
/***** Mark comment as favourite *****/
|
2021-03-02 00:54:26 +01:00
|
|
|
|
TL_Fav_FavCommGbl ();
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
void TL_Fav_FavCommGbl (void)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
2021-02-11 00:58:53 +01:00
|
|
|
|
struct TL_Com_Comment Com;
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Mark comment as favourite *****/
|
2021-03-02 00:54:26 +01:00
|
|
|
|
TL_Fav_FavComm (&Com);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Write HTML inside DIV with form to unfav *****/
|
2021-03-03 10:02:42 +01:00
|
|
|
|
TL_Usr_PutIconFavSha (TL_Usr_FAV_UNF_COMM,
|
|
|
|
|
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
|
|
|
|
TL_Usr_SHOW_FEW_USRS);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
void TL_Fav_UnfCommUsr (void)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
|
|
|
|
/***** Get user whom profile is displayed *****/
|
|
|
|
|
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
|
|
|
|
|
|
|
|
|
/***** Unfav a comment previously marked as favourite *****/
|
2021-03-02 00:54:26 +01:00
|
|
|
|
TL_Fav_UnfCommGbl ();
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
void TL_Fav_UnfCommGbl (void)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
2021-02-11 00:58:53 +01:00
|
|
|
|
struct TL_Com_Comment Com;
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Stop marking as favourite a previously favourited comment *****/
|
2021-03-02 00:54:26 +01:00
|
|
|
|
TL_Fav_UnfComm (&Com);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Write HTML inside DIV with form to fav *****/
|
2021-03-03 10:02:42 +01:00
|
|
|
|
TL_Usr_PutIconFavSha (TL_Usr_FAV_UNF_COMM,
|
|
|
|
|
Com.PubCod,Com.UsrCod,Com.NumFavs,
|
|
|
|
|
TL_Usr_SHOW_FEW_USRS);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
static void TL_Fav_FavComm (struct TL_Com_Comment *Com)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
|
|
|
|
/***** Initialize image *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
Med_MediaConstructor (&Com->Content.Media);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
2021-03-02 20:36:20 +01:00
|
|
|
|
/***** Get data of comment *****/
|
|
|
|
|
Com->PubCod = TL_Pub_GetParamPubCod ();
|
|
|
|
|
TL_Com_GetDataOfCommByCod (Com);
|
|
|
|
|
|
|
|
|
|
/***** Do some checks *****/
|
|
|
|
|
if (!TL_Usr_CheckICanFavSha (Com->PubCod,Com->UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
{
|
|
|
|
|
Med_MediaDestructor (&Com->Content.Media);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 13:52:11 +01:00
|
|
|
|
/***** Trivial check: Have I faved this comment? *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
if (TL_Usr_CheckIfFavedSharedByUsr (TL_Usr_FAV_UNF_COMM,Com->PubCod,
|
|
|
|
|
Gbl.Usrs.Me.UsrDat.UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
{
|
|
|
|
|
Med_MediaDestructor (&Com->Content.Media);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***** Mark comment as favourite in database *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
TL_DB_MarkAsFav (TL_Usr_FAV_UNF_COMM,Com->PubCod);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
2021-03-01 22:31:56 +01:00
|
|
|
|
/***** Update number of times this comment is favourited *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
Com->NumFavs = TL_DB_GetNumFavers (TL_Usr_FAV_UNF_COMM,
|
|
|
|
|
Com->PubCod,Com->UsrCod);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
2021-03-01 22:31:56 +01:00
|
|
|
|
/***** Create notification about favourite post
|
|
|
|
|
for the author of the post *****/
|
|
|
|
|
TL_Ntf_CreateNotifToAuthor (Com->UsrCod,Com->PubCod,
|
|
|
|
|
Ntf_EVENT_TIMELINE_FAV);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Free image *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
Med_MediaDestructor (&Com->Content.Media);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-02 00:54:26 +01:00
|
|
|
|
static void TL_Fav_UnfComm (struct TL_Com_Comment *Com)
|
2021-02-08 16:24:58 +01:00
|
|
|
|
{
|
|
|
|
|
/***** Initialize image *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
Med_MediaConstructor (&Com->Content.Media);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
2021-03-02 20:36:20 +01:00
|
|
|
|
/***** Get data of comment *****/
|
|
|
|
|
Com->PubCod = TL_Pub_GetParamPubCod ();
|
|
|
|
|
TL_Com_GetDataOfCommByCod (Com);
|
|
|
|
|
|
|
|
|
|
/***** Do some checks *****/
|
|
|
|
|
if (!TL_Usr_CheckICanFavSha (Com->PubCod,Com->UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
{
|
|
|
|
|
Med_MediaDestructor (&Com->Content.Media);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-03 02:15:32 +01:00
|
|
|
|
/***** Trivial check: Have I faved this comment? *****/
|
|
|
|
|
if (!TL_Usr_CheckIfFavedSharedByUsr (TL_Usr_FAV_UNF_COMM,Com->PubCod,
|
|
|
|
|
Gbl.Usrs.Me.UsrDat.UsrCod))
|
2021-03-01 22:31:56 +01:00
|
|
|
|
{
|
|
|
|
|
Med_MediaDestructor (&Com->Content.Media);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***** Delete the mark as favourite from database *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
TL_DB_UnmarkAsFav (TL_Usr_FAV_UNF_COMM,Com->PubCod);
|
2021-03-01 22:31:56 +01:00
|
|
|
|
|
|
|
|
|
/***** Update number of times this comment is favourited *****/
|
2021-03-03 02:15:32 +01:00
|
|
|
|
Com->NumFavs = TL_DB_GetNumFavers (TL_Usr_FAV_UNF_COMM,
|
|
|
|
|
Com->PubCod,Com->UsrCod);
|
2021-03-01 22:31:56 +01:00
|
|
|
|
|
|
|
|
|
/***** Mark possible notifications on this comment as removed *****/
|
|
|
|
|
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,Com->PubCod);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
|
|
|
|
|
/***** Free image *****/
|
2021-02-10 19:53:57 +01:00
|
|
|
|
Med_MediaDestructor (&Com->Content.Media);
|
2021-02-08 16:24:58 +01:00
|
|
|
|
}
|