Version20.22

This commit is contained in:
acanas 2021-02-10 19:53:57 +01:00
parent 0214a3c54d
commit 312e7b14eb
17 changed files with 655 additions and 654 deletions

View File

@ -110,7 +110,7 @@ extern struct Globals Gbl;
/************************* Private global variables **************************/ /************************* Private global variables **************************/
/*****************************************************************************/ /*****************************************************************************/
#define Act_DEFAULT_ACTION_AFTER_LOGIN ActSeeSocTmlGbl #define Act_DEFAULT_ACTION_AFTER_LOGIN ActSeeTmlGbl
const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
{ {
@ -125,7 +125,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
// TabStr ****************************************************************** // TabStr ******************************************************************
[ActFrmLogIn ] = {1521, 0,TabStr,ActFrmLogIn , 0,0x001,0x001,0x001,0x001,0x001,0x001,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_WriteLandingPage ,"power-off" }, [ActFrmLogIn ] = {1521, 0,TabStr,ActFrmLogIn , 0,0x001,0x001,0x001,0x001,0x001,0x001,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_WriteLandingPage ,"power-off" },
[ActReqSch ] = { 627, 1,TabStr,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sch_ReqSysSearch ,"search" }, [ActReqSch ] = { 627, 1,TabStr,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sch_ReqSysSearch ,"search" },
[ActSeeSocTmlGbl ] = {1490, 2,TabStr,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_ShowTimelineGbl ,"comment-dots" }, [ActSeeTmlGbl ] = {1490, 2,TabStr,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_ShowTimelineGbl ,"comment-dots" },
[ActSeeSocPrf ] = {1520, 3,TabStr,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_SeeSocialProfiles ,"user-circle" }, [ActSeeSocPrf ] = {1520, 3,TabStr,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_SeeSocialProfiles ,"user-circle" },
[ActSeeCal ] = {1622, 4,TabStr,ActSeeCal ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cal_ShowCalendar ,"calendar" }, [ActSeeCal ] = {1622, 4,TabStr,ActSeeCal ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cal_ShowCalendar ,"calendar" },
[ActSeeNtf ] = { 990, 5,TabStr,ActSeeNtf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ntf_ShowMyNotifications ,"bell" }, [ActSeeNtf ] = { 990, 5,TabStr,ActSeeNtf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ntf_ShowMyNotifications ,"bell" },
@ -140,44 +140,44 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActSch ] = { 628,-1,TabUnk,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Sch_GetParamsSearch ,Sch_SysSearch ,NULL}, [ActSch ] = { 628,-1,TabUnk,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Sch_GetParamsSearch ,Sch_SysSearch ,NULL},
[ActRefNewSocPubGbl ] = {1509,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_AJAX_RFRESH,TL_GetParamWho ,TL_RefreshNewTimelineGbl ,NULL}, [ActRefNewTL_PubGbl ] = {1509,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_AJAX_RFRESH,TL_GetParamWho ,TL_RefreshNewTimelineGbl ,NULL},
[ActRefOldSocPubGbl ] = {1510,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,TL_GetParamWho ,TL_RefreshOldTimelineGbl ,NULL}, [ActRefOldTL_PubGbl ] = {1510,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,TL_GetParamWho ,TL_RefreshOldTimelineGbl ,NULL},
[ActRcvSocPstGbl ] = {1492,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_ReceivePostGbl ,NULL}, [ActRcvTL_PstGbl ] = {1492,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_ReceivePostGbl ,NULL},
[ActRcvSocComGbl ] = {1503,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_ReceiveCommentGbl ,NULL}, [ActRcvTL_ComGbl ] = {1503,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_ReceiveCommentGbl ,NULL},
[ActShoHidSocComGbl ] = {1806,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_ShowHiddenCommentsGbl ,NULL}, [ActShoHidTL_ComGbl ] = {1806,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_ShowHiddenCommentsGbl ,NULL},
[ActAllShaSocNotGbl ] = {1766,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShowAllSharersNoteGbl ,NULL}, [ActAllShaTL_NotGbl ] = {1766,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShowAllSharersNoteGbl ,NULL},
[ActAllFavSocNotGbl ] = {1767,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteGbl ,NULL}, [ActAllFavTL_NotGbl ] = {1767,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteGbl ,NULL},
[ActAllFavSocComGbl ] = {1768,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversComGbl ,NULL}, [ActAllFavTL_ComGbl ] = {1768,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversComGbl ,NULL},
[ActShaSocNotGbl ] = {1495,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShaNoteGbl ,NULL}, [ActShaTL_NotGbl ] = {1495,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShaNoteGbl ,NULL},
[ActUnsSocNotGbl ] = {1496,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_UnsNoteGbl ,NULL}, [ActUnsTL_NotGbl ] = {1496,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_UnsNoteGbl ,NULL},
[ActFavSocNotGbl ] = {1512,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteGbl ,NULL}, [ActFavTL_NotGbl ] = {1512,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteGbl ,NULL},
[ActUnfSocNotGbl ] = {1513,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfNoteGbl ,NULL}, [ActUnfTL_NotGbl ] = {1513,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfNoteGbl ,NULL},
[ActFavSocComGbl ] = {1516,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentGbl ,NULL}, [ActFavTL_ComGbl ] = {1516,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentGbl ,NULL},
[ActUnfSocComGbl ] = {1517,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommentGbl ,NULL}, [ActUnfTL_ComGbl ] = {1517,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommentGbl ,NULL},
[ActReqRemSocPubGbl ] = {1494,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RequestRemNoteGbl ,NULL}, [ActReqRemTL_PubGbl ] = {1494,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RequestRemNoteGbl ,NULL},
[ActRemSocPubGbl ] = {1493,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RemoveNoteGbl ,NULL}, [ActRemTL_PubGbl ] = {1493,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RemoveNoteGbl ,NULL},
[ActReqRemSocComGbl ] = {1505,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RequestRemComGbl ,NULL}, [ActReqRemTL_ComGbl ] = {1505,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RequestRemComGbl ,NULL},
[ActRemSocComGbl ] = {1507,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RemoveComGbl ,NULL}, [ActRemTL_ComGbl ] = {1507,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_GetParamWho ,TL_RemoveComGbl ,NULL},
[ActReqOthPubPrf ] = {1401,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_RequestUserProfile ,NULL}, [ActReqOthPubPrf ] = {1401,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_RequestUserProfile ,NULL},
[ActRefOldSocPubUsr ] = {1511,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_RefreshOldTimelineUsr ,NULL}, [ActRefOldTL_PubUsr ] = {1511,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_RefreshOldTimelineUsr ,NULL},
[ActRcvSocPstUsr ] = {1498,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceivePostUsr ,NULL}, [ActRcvTL_PstUsr ] = {1498,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceivePostUsr ,NULL},
[ActRcvSocComUsr ] = {1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceiveCommentUsr ,NULL}, [ActRcvTL_ComUsr ] = {1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceiveCommentUsr ,NULL},
[ActShoHidSocComUsr ] = {1807,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_ShowHiddenCommentsUsr ,NULL}, [ActShoHidTL_ComUsr ] = {1807,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_ShowHiddenCommentsUsr ,NULL},
[ActAllShaSocNotUsr ] = {1769,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShowAllSharersNoteUsr ,NULL}, [ActAllShaTL_NotUsr ] = {1769,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShowAllSharersNoteUsr ,NULL},
[ActAllFavSocNotUsr ] = {1770,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteUsr ,NULL}, [ActAllFavTL_NotUsr ] = {1770,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteUsr ,NULL},
[ActAllFavSocComUsr ] = {1771,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversComUsr ,NULL}, [ActAllFavTL_ComUsr ] = {1771,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversComUsr ,NULL},
[ActShaSocNotUsr ] = {1499,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShaNoteUsr ,NULL}, [ActShaTL_NotUsr ] = {1499,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShaNoteUsr ,NULL},
[ActUnsSocNotUsr ] = {1500,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_UnsNoteUsr ,NULL}, [ActUnsTL_NotUsr ] = {1500,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_UnsNoteUsr ,NULL},
[ActFavSocNotUsr ] = {1514,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteUsr ,NULL}, [ActFavTL_NotUsr ] = {1514,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteUsr ,NULL},
[ActUnfSocNotUsr ] = {1515,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfNoteUsr ,NULL}, [ActUnfTL_NotUsr ] = {1515,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfNoteUsr ,NULL},
[ActFavSocComUsr ] = {1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentUsr ,NULL}, [ActFavTL_ComUsr ] = {1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentUsr ,NULL},
[ActUnfSocComUsr ] = {1519,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommentUsr ,NULL}, [ActUnfTL_ComUsr ] = {1519,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommentUsr ,NULL},
[ActReqRemSocPubUsr ] = {1501,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemNoteUsr ,NULL}, [ActReqRemTL_PubUsr ] = {1501,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemNoteUsr ,NULL},
[ActRemSocPubUsr ] = {1502,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveNoteUsr ,NULL}, [ActRemTL_PubUsr ] = {1502,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveNoteUsr ,NULL},
[ActReqRemSocComUsr ] = {1506,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemComUsr ,NULL}, [ActReqRemTL_ComUsr ] = {1506,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemComUsr ,NULL},
[ActRemSocComUsr ] = {1508,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveComUsr ,NULL}, [ActRemTL_ComUsr ] = {1508,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveComUsr ,NULL},
[ActSeeOthPubPrf ] = {1402,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_GetUsrDatAndShowUserProfile,NULL}, [ActSeeOthPubPrf ] = {1402,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_GetUsrDatAndShowUserProfile,NULL},
[ActCalFig ] = {1405,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_CalculateFigures ,NULL}, [ActCalFig ] = {1405,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_CalculateFigures ,NULL},
@ -3309,36 +3309,36 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActChgMyTT1stDay, // #1487 ActChgMyTT1stDay, // #1487
ActReqRemOldBrf, // #1488 ActReqRemOldBrf, // #1488
ActRemOldBrf, // #1489 ActRemOldBrf, // #1489
ActSeeSocTmlGbl, // #1490 ActSeeTmlGbl, // #1490
-1, // #1491 (obsolete action) -1, // #1491 (obsolete action)
ActRcvSocPstGbl, // #1492 ActRcvTL_PstGbl, // #1492
ActRemSocPubGbl, // #1493 ActRemTL_PubGbl, // #1493
ActReqRemSocPubGbl, // #1494 ActReqRemTL_PubGbl, // #1494
ActShaSocNotGbl, // #1495 ActShaTL_NotGbl, // #1495
ActUnsSocNotGbl, // #1496 ActUnsTL_NotGbl, // #1496
-1, // #1497 (obsolete action) -1, // #1497 (obsolete action)
ActRcvSocPstUsr, // #1498 ActRcvTL_PstUsr, // #1498
ActShaSocNotUsr, // #1499 ActShaTL_NotUsr, // #1499
ActUnsSocNotUsr, // #1500 ActUnsTL_NotUsr, // #1500
ActReqRemSocPubUsr, // #1501 ActReqRemTL_PubUsr, // #1501
ActRemSocPubUsr, // #1502 ActRemTL_PubUsr, // #1502
ActRcvSocComGbl, // #1503 ActRcvTL_ComGbl, // #1503
ActRcvSocComUsr, // #1504 ActRcvTL_ComUsr, // #1504
ActReqRemSocComGbl, // #1505 ActReqRemTL_ComGbl, // #1505
ActReqRemSocComUsr, // #1506 ActReqRemTL_ComUsr, // #1506
ActRemSocComGbl, // #1507 ActRemTL_ComGbl, // #1507
ActRemSocComUsr, // #1508 ActRemTL_ComUsr, // #1508
ActRefNewSocPubGbl, // #1509 ActRefNewTL_PubGbl, // #1509
ActRefOldSocPubGbl, // #1510 ActRefOldTL_PubGbl, // #1510
ActRefOldSocPubUsr, // #1511 ActRefOldTL_PubUsr, // #1511
ActFavSocNotGbl, // #1512 ActFavTL_NotGbl, // #1512
ActUnfSocNotGbl, // #1513 ActUnfTL_NotGbl, // #1513
ActFavSocNotUsr, // #1514 ActFavTL_NotUsr, // #1514
ActUnfSocNotUsr, // #1515 ActUnfTL_NotUsr, // #1515
ActFavSocComGbl, // #1516 ActFavTL_ComGbl, // #1516
ActUnfSocComGbl, // #1517 ActUnfTL_ComGbl, // #1517
ActFavSocComUsr, // #1518 ActFavTL_ComUsr, // #1518
ActUnfSocComUsr, // #1519 ActUnfTL_ComUsr, // #1519
ActSeeSocPrf, // #1520 ActSeeSocPrf, // #1520
ActFrmLogIn, // #1521 ActFrmLogIn, // #1521
ActUpdSignUpReq, // #1522 ActUpdSignUpReq, // #1522
@ -3585,12 +3585,12 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActUnfSevTch, // #1763 ActUnfSevTch, // #1763
ActChgCooPrf, // #1764 ActChgCooPrf, // #1764
ActChgExtPriPrf, // #1765 ActChgExtPriPrf, // #1765
ActAllShaSocNotGbl, // #1766 ActAllShaTL_NotGbl, // #1766
ActAllFavSocNotGbl, // #1767 ActAllFavTL_NotGbl, // #1767
ActAllFavSocComGbl, // #1768 ActAllFavTL_ComGbl, // #1768
ActAllShaSocNotUsr, // #1769 ActAllShaTL_NotUsr, // #1769
ActAllFavSocNotUsr, // #1770 ActAllFavTL_NotUsr, // #1770
ActAllFavSocComUsr, // #1771 ActAllFavTL_ComUsr, // #1771
ActReqMaiUsr, // #1772 ActReqMaiUsr, // #1772
ActLckPrj, // #1773 ActLckPrj, // #1773
ActUnlPrj, // #1774 ActUnlPrj, // #1774
@ -3625,8 +3625,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActCfgPrj, // #1803 ActCfgPrj, // #1803
ActRcvCfgPrj, // #1804 ActRcvCfgPrj, // #1804
ActReqUsrPrj, // #1805 ActReqUsrPrj, // #1805
ActShoHidSocComGbl, // #1806 ActShoHidTL_ComGbl, // #1806
ActShoHidSocComUsr, // #1807 ActShoHidTL_ComUsr, // #1807
ActSeeMchAnsQstStd, // #1808 ActSeeMchAnsQstStd, // #1808
ActRemMchAnsQstStd, // #1809 ActRemMchAnsQstStd, // #1809
ActSeeMyMchResGam, // #1810 ActSeeMyMchResGam, // #1810

View File

@ -86,7 +86,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
// Actions in menu // Actions in menu
#define ActFrmLogIn (ActWebSvc + 1) #define ActFrmLogIn (ActWebSvc + 1)
#define ActReqSch (ActWebSvc + 2) #define ActReqSch (ActWebSvc + 2)
#define ActSeeSocTmlGbl (ActWebSvc + 3) #define ActSeeTmlGbl (ActWebSvc + 3)
#define ActSeeSocPrf (ActWebSvc + 4) #define ActSeeSocPrf (ActWebSvc + 4)
#define ActSeeCal (ActWebSvc + 5) #define ActSeeCal (ActWebSvc + 5)
#define ActSeeNtf (ActWebSvc + 6) #define ActSeeNtf (ActWebSvc + 6)
@ -102,44 +102,44 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActSch (ActWebSvc + 14) #define ActSch (ActWebSvc + 14)
#define ActRefNewSocPubGbl (ActWebSvc + 15) #define ActRefNewTL_PubGbl (ActWebSvc + 15)
#define ActRefOldSocPubGbl (ActWebSvc + 16) #define ActRefOldTL_PubGbl (ActWebSvc + 16)
#define ActRcvSocPstGbl (ActWebSvc + 17) #define ActRcvTL_PstGbl (ActWebSvc + 17)
#define ActRcvSocComGbl (ActWebSvc + 18) #define ActRcvTL_ComGbl (ActWebSvc + 18)
#define ActShoHidSocComGbl (ActWebSvc + 19) #define ActShoHidTL_ComGbl (ActWebSvc + 19)
#define ActAllShaSocNotGbl (ActWebSvc + 20) #define ActAllShaTL_NotGbl (ActWebSvc + 20)
#define ActAllFavSocNotGbl (ActWebSvc + 21) #define ActAllFavTL_NotGbl (ActWebSvc + 21)
#define ActAllFavSocComGbl (ActWebSvc + 22) #define ActAllFavTL_ComGbl (ActWebSvc + 22)
#define ActShaSocNotGbl (ActWebSvc + 23) #define ActShaTL_NotGbl (ActWebSvc + 23)
#define ActUnsSocNotGbl (ActWebSvc + 24) #define ActUnsTL_NotGbl (ActWebSvc + 24)
#define ActFavSocNotGbl (ActWebSvc + 25) #define ActFavTL_NotGbl (ActWebSvc + 25)
#define ActUnfSocNotGbl (ActWebSvc + 26) #define ActUnfTL_NotGbl (ActWebSvc + 26)
#define ActFavSocComGbl (ActWebSvc + 27) #define ActFavTL_ComGbl (ActWebSvc + 27)
#define ActUnfSocComGbl (ActWebSvc + 28) #define ActUnfTL_ComGbl (ActWebSvc + 28)
#define ActReqRemSocPubGbl (ActWebSvc + 29) #define ActReqRemTL_PubGbl (ActWebSvc + 29)
#define ActRemSocPubGbl (ActWebSvc + 30) #define ActRemTL_PubGbl (ActWebSvc + 30)
#define ActReqRemSocComGbl (ActWebSvc + 31) #define ActReqRemTL_ComGbl (ActWebSvc + 31)
#define ActRemSocComGbl (ActWebSvc + 32) #define ActRemTL_ComGbl (ActWebSvc + 32)
#define ActReqOthPubPrf (ActWebSvc + 33) #define ActReqOthPubPrf (ActWebSvc + 33)
#define ActRefOldSocPubUsr (ActWebSvc + 34) #define ActRefOldTL_PubUsr (ActWebSvc + 34)
#define ActRcvSocPstUsr (ActWebSvc + 35) #define ActRcvTL_PstUsr (ActWebSvc + 35)
#define ActRcvSocComUsr (ActWebSvc + 36) #define ActRcvTL_ComUsr (ActWebSvc + 36)
#define ActShoHidSocComUsr (ActWebSvc + 37) #define ActShoHidTL_ComUsr (ActWebSvc + 37)
#define ActAllShaSocNotUsr (ActWebSvc + 38) #define ActAllShaTL_NotUsr (ActWebSvc + 38)
#define ActAllFavSocNotUsr (ActWebSvc + 39) #define ActAllFavTL_NotUsr (ActWebSvc + 39)
#define ActAllFavSocComUsr (ActWebSvc + 40) #define ActAllFavTL_ComUsr (ActWebSvc + 40)
#define ActShaSocNotUsr (ActWebSvc + 41) #define ActShaTL_NotUsr (ActWebSvc + 41)
#define ActUnsSocNotUsr (ActWebSvc + 42) #define ActUnsTL_NotUsr (ActWebSvc + 42)
#define ActFavSocNotUsr (ActWebSvc + 43) #define ActFavTL_NotUsr (ActWebSvc + 43)
#define ActUnfSocNotUsr (ActWebSvc + 44) #define ActUnfTL_NotUsr (ActWebSvc + 44)
#define ActFavSocComUsr (ActWebSvc + 45) #define ActFavTL_ComUsr (ActWebSvc + 45)
#define ActUnfSocComUsr (ActWebSvc + 46) #define ActUnfTL_ComUsr (ActWebSvc + 46)
#define ActReqRemSocPubUsr (ActWebSvc + 47) #define ActReqRemTL_PubUsr (ActWebSvc + 47)
#define ActRemSocPubUsr (ActWebSvc + 48) #define ActRemTL_PubUsr (ActWebSvc + 48)
#define ActReqRemSocComUsr (ActWebSvc + 49) #define ActReqRemTL_ComUsr (ActWebSvc + 49)
#define ActRemSocComUsr (ActWebSvc + 50) #define ActRemTL_ComUsr (ActWebSvc + 50)
#define ActSeeOthPubPrf (ActWebSvc + 51) #define ActSeeOthPubPrf (ActWebSvc + 51)
#define ActCalFig (ActWebSvc + 52) #define ActCalFig (ActWebSvc + 52)

View File

@ -553,7 +553,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 20.21.4 (2021-02-10)" #define Log_PLATFORM_VERSION "SWAD 20.22 (2021-02-10)"
#define CSS_FILE "swad20.8.css" #define CSS_FILE "swad20.8.css"
#define JS_FILE "swad20.6.2.js" #define JS_FILE "swad20.6.2.js"
/* /*
@ -601,6 +601,7 @@ TODO: DNI de un estudiante sale err
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede. TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
TODO: Salvador Romero Cortés: @acanas opción para editar posts TODO: Salvador Romero Cortés: @acanas opción para editar posts
Version 20.22: Feb 10, 2021 Code refactoring in timeline. (305137 lines)
Version 20.21.4: Feb 10, 2021 Code refactoring in timeline. (305136 lines) Version 20.21.4: Feb 10, 2021 Code refactoring in timeline. (305136 lines)
Version 20.21.3: Feb 10, 2021 Code refactoring in timeline. (305122 lines) Version 20.21.3: Feb 10, 2021 Code refactoring in timeline. (305122 lines)
Version 20.21.2: Feb 10, 2021 Fixed bug in timeline. (305128 lines) Version 20.21.2: Feb 10, 2021 Fixed bug in timeline. (305128 lines)

View File

@ -768,13 +768,13 @@ static void Lay_WriteScriptInit (void)
break; break;
/* Timeline */ /* Timeline */
case ActSeeSocTmlGbl: case ActSeeTmlGbl:
case ActRcvSocPstGbl: case ActRcvTL_PstGbl:
case ActRcvSocComGbl: case ActRcvTL_ComGbl:
case ActReqRemSocPubGbl: case ActReqRemTL_PubGbl:
case ActRemSocPubGbl: case ActRemTL_PubGbl:
case ActReqRemSocComGbl: case ActReqRemTL_ComGbl:
case ActRemSocComGbl: case ActRemTL_ComGbl:
RefreshNewTimeline = true; RefreshNewTimeline = true;
break; break;
@ -874,31 +874,31 @@ static void Lay_WriteScriptParamsAJAX (void)
switch (Gbl.Action.Act) switch (Gbl.Action.Act)
{ {
/* Parameters related with global timeline refreshing */ /* Parameters related with global timeline refreshing */
case ActSeeSocTmlGbl: case ActSeeTmlGbl:
case ActRcvSocPstGbl: case ActRcvTL_PstGbl:
case ActRcvSocComGbl: case ActRcvTL_ComGbl:
case ActReqRemSocPubGbl: case ActReqRemTL_PubGbl:
case ActRemSocPubGbl: case ActRemTL_PubGbl:
case ActReqRemSocComGbl: case ActReqRemTL_ComGbl:
case ActRemSocComGbl: case ActRemTL_ComGbl:
/* In all the actions related to view or editing global timeline ==> /* In all the actions related to view or editing global timeline ==>
put parameters used by AJAX */ put parameters used by AJAX */
// Refresh parameters // Refresh parameters
HTM_TxtF ("var RefreshParamNxtActNewPub = \"act=%ld\";\n" HTM_TxtF ("var RefreshParamNxtActNewPub = \"act=%ld\";\n"
"var RefreshParamNxtActOldPub = \"act=%ld\";\n" "var RefreshParamNxtActOldPub = \"act=%ld\";\n"
"var RefreshParamWho = \"Who=%u\";\n", "var RefreshParamWho = \"Who=%u\";\n",
Act_GetActCod (ActRefNewSocPubGbl), Act_GetActCod (ActRefNewTL_PubGbl),
Act_GetActCod (ActRefOldSocPubGbl), Act_GetActCod (ActRefOldTL_PubGbl),
(unsigned) TL_GetGlobalWho ()); // Global variable got in a priori function (unsigned) TL_GetGlobalWho ()); // Global variable got in a priori function
break; break;
/* Parameters related with user timeline refreshing */ /* Parameters related with user timeline refreshing */
case ActSeeOthPubPrf: case ActSeeOthPubPrf:
case ActRcvSocPstUsr: case ActRcvTL_PstUsr:
case ActRcvSocComUsr: case ActRcvTL_ComUsr:
case ActReqRemSocPubUsr: case ActReqRemTL_PubUsr:
case ActRemSocPubUsr: case ActRemTL_PubUsr:
case ActReqRemSocComUsr: case ActReqRemTL_ComUsr:
case ActRemSocComUsr: case ActRemTL_ComUsr:
/* In all the actions related to view or editing user's timeline ==> /* In all the actions related to view or editing user's timeline ==>
put parameters used by AJAX */ put parameters used by AJAX */
if (Gbl.Usrs.Other.UsrDat.UsrCod <= 0) if (Gbl.Usrs.Other.UsrDat.UsrCod <= 0)
@ -906,7 +906,7 @@ static void Lay_WriteScriptParamsAJAX (void)
// Refresh parameters // Refresh parameters
HTM_TxtF ("var RefreshParamNxtActOldPub = \"act=%ld\";\n" HTM_TxtF ("var RefreshParamNxtActOldPub = \"act=%ld\";\n"
"var RefreshParamUsr = \"OtherUsrCod=%s\";\n", "var RefreshParamUsr = \"OtherUsrCod=%s\";\n",
Act_GetActCod (ActRefOldSocPubUsr), Act_GetActCod (ActRefOldTL_PubUsr),
Gbl.Usrs.Other.UsrDat.EncryptedUsrCod); Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
break; break;
/* Parameters related with match refreshing (for students) */ /* Parameters related with match refreshing (for students) */

View File

@ -67,7 +67,7 @@ static const Act_Action_t Mnu_MenuActions[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_
[TabStr] = { [TabStr] = {
[ 0] = ActFrmLogIn, [ 0] = ActFrmLogIn,
[ 1] = ActReqSch, [ 1] = ActReqSch,
[ 2] = ActSeeSocTmlGbl, [ 2] = ActSeeTmlGbl,
[ 3] = ActSeeSocPrf, [ 3] = ActSeeSocPrf,
[ 4] = ActSeeCal, [ 4] = ActSeeCal,
[ 5] = ActSeeNtf, [ 5] = ActSeeNtf,

View File

@ -106,10 +106,10 @@ static const Act_Action_t Ntf_DefaultActions[Ntf_NUM_NOTIFY_EVENTS] =
{ {
[Ntf_EVENT_UNKNOWN ] = ActUnk, [Ntf_EVENT_UNKNOWN ] = ActUnk,
/* Start tab */ /* Start tab */
[Ntf_EVENT_TIMELINE_COMMENT ] = ActSeeSocTmlGbl, [Ntf_EVENT_TIMELINE_COMMENT ] = ActSeeTmlGbl,
[Ntf_EVENT_TIMELINE_FAV ] = ActSeeSocTmlGbl, [Ntf_EVENT_TIMELINE_FAV ] = ActSeeTmlGbl,
[Ntf_EVENT_TIMELINE_SHARE ] = ActSeeSocTmlGbl, [Ntf_EVENT_TIMELINE_SHARE ] = ActSeeTmlGbl,
[Ntf_EVENT_TIMELINE_MENTION ] = ActSeeSocTmlGbl, [Ntf_EVENT_TIMELINE_MENTION ] = ActSeeTmlGbl,
[Ntf_EVENT_FOLLOWER ] = ActSeeFlr, [Ntf_EVENT_FOLLOWER ] = ActSeeFlr,
/* System tab */ /* System tab */
/* Country tab */ /* Country tab */
@ -724,7 +724,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
case Ntf_EVENT_TIMELINE_SHARE: case Ntf_EVENT_TIMELINE_SHARE:
case Ntf_EVENT_TIMELINE_MENTION: case Ntf_EVENT_TIMELINE_MENTION:
// Cod is the code of the social publishing // Cod is the code of the social publishing
Frm_StartForm (ActSeeSocTmlGbl); Frm_StartForm (ActSeeTmlGbl);
TL_PutHiddenParamPubCod (Cod); TL_PutHiddenParamPubCod (Cod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Ntf_PutHiddenParamNotifyEvent (NotifyEvent); Ntf_PutHiddenParamNotifyEvent (NotifyEvent);

View File

@ -1334,7 +1334,7 @@ void Prf_IncrementNumClicksUsr (long UsrCod)
/********* Increment number of social publications sent by a user ************/ /********* Increment number of social publications sent by a user ************/
/*****************************************************************************/ /*****************************************************************************/
void Prf_IncrementNumSocPubUsr (long UsrCod) void Prf_IncrementNumPubsUsr (long UsrCod)
{ {
/***** Increment number of social publications *****/ /***** Increment number of social publications *****/
// If NumSocPub < 0 ==> not yet calculated, so do nothing // If NumSocPub < 0 ==> not yet calculated, so do nothing

View File

@ -71,7 +71,7 @@ bool Prf_GetAndStoreAllUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
void Prf_CreateNewUsrFigures (long UsrCod,bool CreatingMyOwnAccount); void Prf_CreateNewUsrFigures (long UsrCod,bool CreatingMyOwnAccount);
void Prf_RemoveUsrFigures (long UsrCod); void Prf_RemoveUsrFigures (long UsrCod);
void Prf_IncrementNumClicksUsr (long UsrCod); void Prf_IncrementNumClicksUsr (long UsrCod);
void Prf_IncrementNumSocPubUsr (long UsrCod); void Prf_IncrementNumPubsUsr (long UsrCod);
void Prf_IncrementNumFileViewsUsr (long UsrCod); void Prf_IncrementNumFileViewsUsr (long UsrCod);
void Prf_IncrementNumForPstUsr (long UsrCod); void Prf_IncrementNumForPstUsr (long UsrCod);
void Prf_IncrementNumMsgSntUsr (long UsrCod); void Prf_IncrementNumMsgSntUsr (long UsrCod);

View File

@ -19603,7 +19603,7 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
"Procurar" "Procurar"
#endif #endif
, ,
// 2: ActSeeSocTmlGbl // 2: ActSeeTmlGbl
#if L==1 // ca #if L==1 // ca
"Timeline" "Timeline"
#elif L==2 // de #elif L==2 // de
@ -21470,7 +21470,7 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
"Procurar disciplinas, professores e documentos" "Procurar disciplinas, professores e documentos"
#endif #endif
, ,
// 2: ActSeeSocTmlGbl // 2: ActSeeTmlGbl
#if L==1 // ca #if L==1 // ca
"Timeline dels usuaris que segueixo o de tots els usuaris" "Timeline dels usuaris que segueixo o de tots els usuaris"
#elif L==2 // de #elif L==2 // de

View File

@ -188,7 +188,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request search" // Precisa de tradução "Request search" // Precisa de tradução
#endif #endif
, ,
[ActSeeSocTmlGbl] = [ActSeeTmlGbl] =
#if L==1 // ca #if L==1 // ca
"Show timeline global" // Necessita traducció "Show timeline global" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -440,7 +440,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Search" // Precisa de tradução "Search" // Precisa de tradução
#endif #endif
, ,
[ActRefNewSocPubGbl] = [ActRefNewTL_PubGbl] =
#if L==1 // ca #if L==1 // ca
"Refresh global timeline (new publications)" // Necessita traducció "Refresh global timeline (new publications)" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -461,7 +461,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Refresh global timeline (new publications)" // Precisa de tradução "Refresh global timeline (new publications)" // Precisa de tradução
#endif #endif
, ,
[ActRefOldSocPubGbl] = [ActRefOldTL_PubGbl] =
#if L==1 // ca #if L==1 // ca
"Show previous publications in global timeline" // Necessita traducció "Show previous publications in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -482,7 +482,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show previous publications in global timeline" // Precisa de tradução "Show previous publications in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActRcvSocPstGbl] = [ActRcvTL_PstGbl] =
#if L==1 // ca #if L==1 // ca
"Create post in global timeline" // Necessita traducció "Create post in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -503,7 +503,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create post in global timeline" // Precisa de tradução "Create post in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActRcvSocComGbl] = [ActRcvTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Create comment in global timeline" // Necessita traducció "Create comment in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -524,7 +524,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create comment in global timeline" // Precisa de tradução "Create comment in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActShoHidSocComGbl] = [ActShoHidTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Show hidden comments in global timeline" // Necessita traducció "Show hidden comments in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -545,7 +545,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show hidden comments in global timeline" // Precisa de tradução "Show hidden comments in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActAllShaSocNotGbl] = [ActAllShaTL_NotGbl] =
#if L==1 // ca #if L==1 // ca
"Show who shared a publication in global timeline" // Necessita traducció "Show who shared a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -566,7 +566,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show who shared a publication in global timeline" // Precisa de tradução "Show who shared a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActAllFavSocNotGbl] = [ActAllFavTL_NotGbl] =
#if L==1 // ca #if L==1 // ca
"Show who favourited a publication in global timeline" // Necessita traducció "Show who favourited a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -587,7 +587,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show who favourited a publication in global timeline" // Precisa de tradução "Show who favourited a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActAllFavSocComGbl] = [ActAllFavTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Show who favourited a comment in global timeline" // Necessita traducció "Show who favourited a comment in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -608,7 +608,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show who favourited a comment in global timeline" // Precisa de tradução "Show who favourited a comment in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActShaSocNotGbl] = [ActShaTL_NotGbl] =
#if L==1 // ca #if L==1 // ca
"Share a publication in global timeline" // Necessita traducció "Share a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -629,7 +629,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Share a publication in global timeline" // Precisa de tradução "Share a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActUnsSocNotGbl] = [ActUnsTL_NotGbl] =
#if L==1 // ca #if L==1 // ca
"Unshare a publication in global timeline" // Necessita traducció "Unshare a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -650,7 +650,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Unshare a publication in global timeline" // Precisa de tradução "Unshare a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActFavSocNotGbl] = [ActFavTL_NotGbl] =
#if L==1 // ca #if L==1 // ca
"Favourite a publication in global timeline" // Necessita traducció "Favourite a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -671,7 +671,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Favourite a publication in global timeline" // Precisa de tradução "Favourite a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActUnfSocNotGbl] = [ActUnfTL_NotGbl] =
#if L==1 // ca #if L==1 // ca
"Unfavourite a publication in global timeline" // Necessita traducció "Unfavourite a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -692,7 +692,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Unfavourite a publication in global timeline" // Precisa de tradução "Unfavourite a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActFavSocComGbl] = [ActFavTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Favourite a comment in global timeline" // Necessita traducció "Favourite a comment in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -713,7 +713,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Favourite a comment in global timeline" // Precisa de tradução "Favourite a comment in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActUnfSocComGbl] = [ActUnfTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Unfavourite a comment in global timeline" // Necessita traducció "Unfavourite a comment in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -734,7 +734,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Unfavourite a comment in global timeline" // Precisa de tradução "Unfavourite a comment in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActReqRemSocPubGbl] = [ActReqRemTL_PubGbl] =
#if L==1 // ca #if L==1 // ca
"Request deletion of a publication in global timeline" // Necessita traducció "Request deletion of a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -755,7 +755,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request deletion of a publication in global timeline" // Precisa de tradução "Request deletion of a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActRemSocPubGbl] = [ActRemTL_PubGbl] =
#if L==1 // ca #if L==1 // ca
"Delete a publication in global timeline" // Necessita traducció "Delete a publication in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -776,7 +776,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Delete a publication in global timeline" // Precisa de tradução "Delete a publication in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActReqRemSocComGbl] = [ActReqRemTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Request deletion of a comment in global timeline" // Necessita traducció "Request deletion of a comment in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -797,7 +797,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request deletion of a comment in global timeline" // Precisa de tradução "Request deletion of a comment in global timeline" // Precisa de tradução
#endif #endif
, ,
[ActRemSocComGbl] = [ActRemTL_ComGbl] =
#if L==1 // ca #if L==1 // ca
"Delete a comment in global timeline" // Necessita traducció "Delete a comment in global timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -839,7 +839,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request to show public user profile" // Precisa de tradução "Request to show public user profile" // Precisa de tradução
#endif #endif
, ,
[ActRefOldSocPubUsr] = [ActRefOldTL_PubUsr] =
#if L==1 // ca #if L==1 // ca
"Show previous publications in user timeline" // Necessita traducció "Show previous publications in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -860,7 +860,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show previous publications in user timeline" // Precisa de tradução "Show previous publications in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActRcvSocPstUsr] = [ActRcvTL_PstUsr] =
#if L==1 // ca #if L==1 // ca
"Create post in user timeline" // Necessita traducció "Create post in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -881,7 +881,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create post in user timeline" // Precisa de tradução "Create post in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActRcvSocComUsr] = [ActRcvTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Create comment in user timeline" // Necessita traducció "Create comment in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -902,7 +902,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create comment in user timeline" // Precisa de tradução "Create comment in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActShoHidSocComUsr] = [ActShoHidTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Show hidden comments in user timeline" // Necessita traducció "Show hidden comments in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -923,7 +923,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show hidden comments in user timeline" // Precisa de tradução "Show hidden comments in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActAllShaSocNotUsr] = [ActAllShaTL_NotUsr] =
#if L==1 // ca #if L==1 // ca
"Show who shared a publication in user timeline" // Necessita traducció "Show who shared a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -944,7 +944,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show who shared a publication in user timeline" // Precisa de tradução "Show who shared a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActAllFavSocNotUsr] = [ActAllFavTL_NotUsr] =
#if L==1 // ca #if L==1 // ca
"Show who favourited a publication in user timeline" // Necessita traducció "Show who favourited a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -965,7 +965,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show who favourited a publication in user timeline" // Precisa de tradução "Show who favourited a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActAllFavSocComUsr] = [ActAllFavTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Show who favourited a comment in user timeline" // Necessita traducció "Show who favourited a comment in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -986,7 +986,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Show who favourited a comment in user timeline" // Precisa de tradução "Show who favourited a comment in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActShaSocNotUsr] = [ActShaTL_NotUsr] =
#if L==1 // ca #if L==1 // ca
"Share a publication in user timeline" // Necessita traducció "Share a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1007,7 +1007,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Share a publication in user timeline" // Precisa de tradução "Share a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActUnsSocNotUsr] = [ActUnsTL_NotUsr] =
#if L==1 // ca #if L==1 // ca
"Unshare a publication in user timeline" // Necessita traducció "Unshare a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1028,7 +1028,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Unshare a publication in user timeline" // Precisa de tradução "Unshare a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActFavSocNotUsr] = [ActFavTL_NotUsr] =
#if L==1 // ca #if L==1 // ca
"Favourite a publication in user timeline" // Necessita traducció "Favourite a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1049,7 +1049,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Favourite a publication in user timeline" // Precisa de tradução "Favourite a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActUnfSocNotUsr] = [ActUnfTL_NotUsr] =
#if L==1 // ca #if L==1 // ca
"Unfavourite a publication in user timeline" // Necessita traducció "Unfavourite a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1070,7 +1070,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Unfavourite a publication in user timeline" // Precisa de tradução "Unfavourite a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActFavSocComUsr] = [ActFavTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Favourite a comment in user timeline" // Necessita traducció "Favourite a comment in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1091,7 +1091,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Favourite a comment in user timeline" // Precisa de tradução "Favourite a comment in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActUnfSocComUsr] = [ActUnfTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Unfavourite a comment in user timeline" // Necessita traducció "Unfavourite a comment in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1112,7 +1112,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Unfavourite a comment in user timeline" // Precisa de tradução "Unfavourite a comment in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActReqRemSocPubUsr] = [ActReqRemTL_PubUsr] =
#if L==1 // ca #if L==1 // ca
"Request deletion of a publication in user timeline" // Necessita traducció "Request deletion of a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1133,7 +1133,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request deletion of a publication in user timeline" // Precisa de tradução "Request deletion of a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActRemSocPubUsr] = [ActRemTL_PubUsr] =
#if L==1 // ca #if L==1 // ca
"Delete a publication in user timeline" // Necessita traducció "Delete a publication in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1154,7 +1154,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Delete a publication in user timeline" // Precisa de tradução "Delete a publication in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActReqRemSocComUsr] = [ActReqRemTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Request deletion of a comment in user timeline" // Necessita traducció "Request deletion of a comment in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de
@ -1175,7 +1175,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request deletion of a comment in user timeline" // Precisa de tradução "Request deletion of a comment in user timeline" // Precisa de tradução
#endif #endif
, ,
[ActRemSocComUsr] = [ActRemTL_ComUsr] =
#if L==1 // ca #if L==1 // ca
"Delete a comment in user timeline" // Necessita traducció "Delete a comment in user timeline" // Necessita traducció
#elif L==2 // de #elif L==2 // de

File diff suppressed because it is too large Load Diff

View File

@ -194,7 +194,7 @@ void TL_MarkNoteAsUnavailable (TL_NoteType_t NoteType,long Cod);
void TL_MarkNoteOneFileAsUnavailable (const char *Path); void TL_MarkNoteOneFileAsUnavailable (const char *Path);
void TL_MarkNotesChildrenOfFolderAsUnavailable (const char *Path); void TL_MarkNotesChildrenOfFolderAsUnavailable (const char *Path);
void TL_PublishNoteInTimeline (struct TL_Publication *SocPub); void TL_PublishNoteInTimeline (struct TL_Publication *Pub);
void TL_ReceivePostUsr (void); void TL_ReceivePostUsr (void);
void TL_ReceivePostGbl (void); void TL_ReceivePostGbl (void);
@ -236,8 +236,8 @@ void TL_FormFavSha (Act_Action_t ActionGbl,Act_Action_t ActionUsr,
const char *ParamFormat,long ParamCod, const char *ParamFormat,long ParamCod,
const char *Icon,const char *Title); const char *Icon,const char *Title);
void TL_GetDataOfNoteByCod (struct TL_Note *SocNot); void TL_GetDataOfNoteByCod (struct TL_Note *Not);
void TL_GetDataOfCommByCod (struct TL_Comment *SocCom); void TL_GetDataOfCommByCod (struct TL_Comment *Com);
void TL_ClearOldTimelinesDB (void); void TL_ClearOldTimelinesDB (void);

View File

@ -63,18 +63,18 @@ static void TL_Fav_PutFormToUnfNote (long ParamCod);
static void TL_Fav_PutFormToFavComment (long ParamCod); static void TL_Fav_PutFormToFavComment (long ParamCod);
static void TL_Fav_PutFormToUnfComment (long ParamCod); static void TL_Fav_PutFormToUnfComment (long ParamCod);
static void TL_Fav_FavNote (struct TL_Note *SocNot); static void TL_Fav_FavNote (struct TL_Note *Not);
static void TL_Fav_UnfNote (struct TL_Note *SocNot); static void TL_Fav_UnfNote (struct TL_Note *Not);
static void TL_Fav_FavComment (struct TL_Comment *SocCom); static void TL_Fav_FavComment (struct TL_Comment *Com);
static void TL_Fav_UnfComment (struct TL_Comment *SocCom); static void TL_Fav_UnfComment (struct TL_Comment *Com);
static bool TL_Fav_CheckIfNoteIsFavedByUsr (long NotCod,long UsrCod); static bool TL_Fav_CheckIfNoteIsFavedByUsr (long NotCod,long UsrCod);
static bool TL_Fav_CheckIfCommIsFavedByUsr (long PubCod,long UsrCod); static bool TL_Fav_CheckIfCommIsFavedByUsr (long PubCod,long UsrCod);
static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot, static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs); TL_HowManyUsrs_t HowManyUsrs);
static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocCom, static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *Com,
TL_HowManyUsrs_t HowManyUsrs); TL_HowManyUsrs_t HowManyUsrs);
/*****************************************************************************/ /*****************************************************************************/
@ -108,7 +108,7 @@ static void TL_Fav_PutFormToFavNote (long ParamCod)
extern const char *Txt_Mark_as_favourite; extern const char *Txt_Mark_as_favourite;
/***** Form and icon to mark note as favourite *****/ /***** Form and icon to mark note as favourite *****/
TL_FormFavSha (ActFavSocNotGbl,ActFavSocNotUsr, TL_FormFavSha (ActFavTL_NotGbl,ActFavTL_NotUsr,
"NotCod=%ld",ParamCod, "NotCod=%ld",ParamCod,
TL_ICON_FAV,Txt_Mark_as_favourite); TL_ICON_FAV,Txt_Mark_as_favourite);
} }
@ -118,7 +118,7 @@ static void TL_Fav_PutFormToUnfNote (long ParamCod)
extern const char *Txt_TIMELINE_NOTE_Favourite; extern const char *Txt_TIMELINE_NOTE_Favourite;
/***** Form and icon to unfav (remove mark as favourite) note *****/ /***** Form and icon to unfav (remove mark as favourite) note *****/
TL_FormFavSha (ActUnfSocNotGbl,ActUnfSocNotUsr, TL_FormFavSha (ActUnfTL_NotGbl,ActUnfTL_NotUsr,
"NotCod=%ld",ParamCod, "NotCod=%ld",ParamCod,
TL_ICON_FAVED,Txt_TIMELINE_NOTE_Favourite); TL_ICON_FAVED,Txt_TIMELINE_NOTE_Favourite);
} }
@ -132,7 +132,7 @@ static void TL_Fav_PutFormToFavComment (long ParamCod)
extern const char *Txt_Mark_as_favourite; extern const char *Txt_Mark_as_favourite;
/***** Form and icon to mark comment as favourite *****/ /***** Form and icon to mark comment as favourite *****/
TL_FormFavSha (ActFavSocComGbl,ActFavSocComUsr, TL_FormFavSha (ActFavTL_ComGbl,ActFavTL_ComUsr,
"PubCod=%ld",ParamCod, "PubCod=%ld",ParamCod,
TL_ICON_FAV,Txt_Mark_as_favourite); TL_ICON_FAV,Txt_Mark_as_favourite);
} }
@ -142,7 +142,7 @@ static void TL_Fav_PutFormToUnfComment (long ParamCod)
extern const char *Txt_TIMELINE_NOTE_Favourite; extern const char *Txt_TIMELINE_NOTE_Favourite;
/***** Form and icon to unfav (remove mark as favourite) comment *****/ /***** Form and icon to unfav (remove mark as favourite) comment *****/
TL_FormFavSha (ActUnfSocComGbl,ActUnfSocComUsr, TL_FormFavSha (ActUnfTL_ComGbl,ActUnfTL_ComUsr,
"PubCod=%ld",ParamCod, "PubCod=%ld",ParamCod,
TL_ICON_FAVED,Txt_TIMELINE_NOTE_Favourite); TL_ICON_FAVED,Txt_TIMELINE_NOTE_Favourite);
} }
@ -162,14 +162,14 @@ void TL_Fav_ShowAllFaversNoteUsr (void)
void TL_Fav_ShowAllFaversNoteGbl (void) void TL_Fav_ShowAllFaversNoteGbl (void)
{ {
struct TL_Note SocNot; struct TL_Note Not;
/***** Get data of note *****/ /***** Get data of note *****/
SocNot.NotCod = TL_GetParamNotCod (); Not.NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (&SocNot); TL_GetDataOfNoteByCod (&Not);
/***** Write HTML inside DIV with form to fav/unfav *****/ /***** Write HTML inside DIV with form to fav/unfav *****/
TL_Fav_PutFormToFavUnfNote (&SocNot,TL_SHOW_ALL_USRS); TL_Fav_PutFormToFavUnfNote (&Not,TL_SHOW_ALL_USRS);
} }
void TL_Fav_FavNoteUsr (void) void TL_Fav_FavNoteUsr (void)
@ -183,13 +183,13 @@ void TL_Fav_FavNoteUsr (void)
void TL_Fav_FavNoteGbl (void) void TL_Fav_FavNoteGbl (void)
{ {
struct TL_Note SocNot; struct TL_Note Not;
/***** Mark note as favourite *****/ /***** Mark note as favourite *****/
TL_Fav_FavNote (&SocNot); TL_Fav_FavNote (&Not);
/***** Write HTML inside DIV with form to unfav *****/ /***** Write HTML inside DIV with form to unfav *****/
TL_Fav_PutFormToFavUnfNote (&SocNot,TL_SHOW_FEW_USRS); TL_Fav_PutFormToFavUnfNote (&Not,TL_SHOW_FEW_USRS);
} }
void TL_Fav_UnfNoteUsr (void) void TL_Fav_UnfNoteUsr (void)
@ -203,58 +203,58 @@ void TL_Fav_UnfNoteUsr (void)
void TL_Fav_UnfNoteGbl (void) void TL_Fav_UnfNoteGbl (void)
{ {
struct TL_Note SocNot; struct TL_Note Not;
/***** Stop marking as favourite a previously favourited note *****/ /***** Stop marking as favourite a previously favourited note *****/
TL_Fav_UnfNote (&SocNot); TL_Fav_UnfNote (&Not);
/***** Write HTML inside DIV with form to fav *****/ /***** Write HTML inside DIV with form to fav *****/
TL_Fav_PutFormToFavUnfNote (&SocNot,TL_SHOW_FEW_USRS); TL_Fav_PutFormToFavUnfNote (&Not,TL_SHOW_FEW_USRS);
} }
void TL_Fav_PutFormToFavUnfNote (const struct TL_Note *SocNot, void TL_Fav_PutFormToFavUnfNote (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs) TL_HowManyUsrs_t HowManyUsrs)
{ {
bool IAmTheAuthor; bool IAmTheAuthor;
bool IAmAFaverOfThisSocNot; bool IAmAFaverOfThisNot;
/***** Put form to fav/unfav this note *****/ /***** Put form to fav/unfav this note *****/
HTM_DIV_Begin ("class=\"TL_ICO\""); HTM_DIV_Begin ("class=\"TL_ICO\"");
IAmTheAuthor = Usr_ItsMe (SocNot->UsrCod); IAmTheAuthor = Usr_ItsMe (Not->UsrCod);
if (SocNot->Unavailable || // Unavailable notes can not be favourited if (Not->Unavailable || // Unavailable notes can not be favourited
IAmTheAuthor) // I am the author IAmTheAuthor) // I am the author
/* Put disabled icon */ /* Put disabled icon */
TL_Fav_PutDisabledIconFav (SocNot->NumFavs); TL_Fav_PutDisabledIconFav (Not->NumFavs);
else // Available and I am not the author else // Available and I am not the author
{ {
/* Put icon to fav/unfav */ /* Put icon to fav/unfav */
IAmAFaverOfThisSocNot = TL_Fav_CheckIfNoteIsFavedByUsr (SocNot->NotCod, IAmAFaverOfThisNot = TL_Fav_CheckIfNoteIsFavedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
if (IAmAFaverOfThisSocNot) // I have favourited this note if (IAmAFaverOfThisNot) // I have favourited this note
TL_Fav_PutFormToUnfNote (SocNot->NotCod); TL_Fav_PutFormToUnfNote (Not->NotCod);
else // I am not a faver of this note else // I am not a faver of this note
TL_Fav_PutFormToFavNote (SocNot->NotCod); TL_Fav_PutFormToFavNote (Not->NotCod);
} }
HTM_DIV_End (); HTM_DIV_End ();
/***** Show who have marked this note as favourite *****/ /***** Show who have marked this note as favourite *****/
TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot,HowManyUsrs); TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (Not,HowManyUsrs);
} }
static void TL_Fav_FavNote (struct TL_Note *SocNot) static void TL_Fav_FavNote (struct TL_Note *Not)
{ {
bool ItsMe; bool ItsMe;
long OriginalPubCod; long OriginalPubCod;
/***** Get data of note *****/ /***** Get data of note *****/
SocNot->NotCod = TL_GetParamNotCod (); Not->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (SocNot); TL_GetDataOfNoteByCod (Not);
if (SocNot->NotCod > 0) if (Not->NotCod > 0)
{ {
ItsMe = Usr_ItsMe (SocNot->UsrCod); ItsMe = Usr_ItsMe (Not->UsrCod);
if (Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author if (Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author
if (!TL_Fav_CheckIfNoteIsFavedByUsr (SocNot->NotCod, if (!TL_Fav_CheckIfNoteIsFavedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I have not yet favourited the note Gbl.Usrs.Me.UsrDat.UsrCod)) // I have not yet favourited the note
{ {
/***** Mark as favourite in database *****/ /***** Mark as favourite in database *****/
@ -263,50 +263,50 @@ static void TL_Fav_FavNote (struct TL_Note *SocNot)
" (NotCod,UsrCod,TimeFav)" " (NotCod,UsrCod,TimeFav)"
" VALUES" " VALUES"
" (%ld,%ld,NOW())", " (%ld,%ld,NOW())",
SocNot->NotCod, Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Update number of times this note is favourited *****/ /***** Update number of times this note is favourited *****/
TL_Fav_GetNumTimesANoteHasBeenFav (SocNot); TL_Fav_GetNumTimesANoteHasBeenFav (Not);
/***** Create notification about favourite post /***** Create notification about favourite post
for the author of the post *****/ for the author of the post *****/
OriginalPubCod = TL_GetPubCodOfOriginalNote (SocNot->NotCod); OriginalPubCod = TL_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0) if (OriginalPubCod > 0)
TL_CreateNotifToAuthor (SocNot->UsrCod,OriginalPubCod,Ntf_EVENT_TIMELINE_FAV); TL_CreateNotifToAuthor (Not->UsrCod,OriginalPubCod,Ntf_EVENT_TIMELINE_FAV);
} }
} }
} }
static void TL_Fav_UnfNote (struct TL_Note *SocNot) static void TL_Fav_UnfNote (struct TL_Note *Not)
{ {
long OriginalPubCod; long OriginalPubCod;
bool ItsMe; bool ItsMe;
/***** Get data of note *****/ /***** Get data of note *****/
SocNot->NotCod = TL_GetParamNotCod (); Not->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (SocNot); TL_GetDataOfNoteByCod (Not);
if (SocNot->NotCod > 0) if (Not->NotCod > 0)
{ {
ItsMe = Usr_ItsMe (SocNot->UsrCod); ItsMe = Usr_ItsMe (Not->UsrCod);
if (SocNot->NumFavs && if (Not->NumFavs &&
Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author
if (TL_Fav_CheckIfNoteIsFavedByUsr (SocNot->NotCod, if (TL_Fav_CheckIfNoteIsFavedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I have favourited the note Gbl.Usrs.Me.UsrDat.UsrCod)) // I have favourited the note
{ {
/***** Delete the mark as favourite from database *****/ /***** Delete the mark as favourite from database *****/
DB_QueryDELETE ("can not unfavourite note", DB_QueryDELETE ("can not unfavourite note",
"DELETE FROM tl_notes_fav" "DELETE FROM tl_notes_fav"
" WHERE NotCod=%ld AND UsrCod=%ld", " WHERE NotCod=%ld AND UsrCod=%ld",
SocNot->NotCod, Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Update number of times this note is favourited *****/ /***** Update number of times this note is favourited *****/
TL_Fav_GetNumTimesANoteHasBeenFav (SocNot); TL_Fav_GetNumTimesANoteHasBeenFav (Not);
/***** Mark possible notifications on this note as removed *****/ /***** Mark possible notifications on this note as removed *****/
OriginalPubCod = TL_GetPubCodOfOriginalNote (SocNot->NotCod); OriginalPubCod = TL_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0) if (OriginalPubCod > 0)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,OriginalPubCod); Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,OriginalPubCod);
} }
@ -328,16 +328,16 @@ void TL_Fav_ShowAllFaversComUsr (void)
void TL_Fav_ShowAllFaversComGbl (void) void TL_Fav_ShowAllFaversComGbl (void)
{ {
struct TL_Comment SocCom; struct TL_Comment Com;
/***** Get data of comment *****/ /***** Get data of comment *****/
Med_MediaConstructor (&SocCom.Content.Media); Med_MediaConstructor (&Com.Content.Media);
SocCom.PubCod = TL_GetParamPubCod (); Com.PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (&SocCom); TL_GetDataOfCommByCod (&Com);
Med_MediaDestructor (&SocCom.Content.Media); Med_MediaDestructor (&Com.Content.Media);
/***** Write HTML inside DIV with form to fav/unfav *****/ /***** Write HTML inside DIV with form to fav/unfav *****/
TL_Fav_PutFormToFavUnfComment (&SocCom,TL_SHOW_ALL_USRS); TL_Fav_PutFormToFavUnfComment (&Com,TL_SHOW_ALL_USRS);
} }
void TL_Fav_FavCommentUsr (void) void TL_Fav_FavCommentUsr (void)
@ -351,13 +351,13 @@ void TL_Fav_FavCommentUsr (void)
void TL_Fav_FavCommentGbl (void) void TL_Fav_FavCommentGbl (void)
{ {
struct TL_Comment SocCom; struct TL_Comment Com;
/***** Mark comment as favourite *****/ /***** Mark comment as favourite *****/
TL_Fav_FavComment (&SocCom); TL_Fav_FavComment (&Com);
/***** Write HTML inside DIV with form to unfav *****/ /***** Write HTML inside DIV with form to unfav *****/
TL_Fav_PutFormToFavUnfComment (&SocCom,TL_SHOW_FEW_USRS); TL_Fav_PutFormToFavUnfComment (&Com,TL_SHOW_FEW_USRS);
} }
void TL_Fav_UnfCommentUsr (void) void TL_Fav_UnfCommentUsr (void)
@ -371,61 +371,61 @@ void TL_Fav_UnfCommentUsr (void)
void TL_Fav_UnfCommentGbl (void) void TL_Fav_UnfCommentGbl (void)
{ {
struct TL_Comment SocCom; struct TL_Comment Com;
/***** Stop marking as favourite a previously favourited comment *****/ /***** Stop marking as favourite a previously favourited comment *****/
TL_Fav_UnfComment (&SocCom); TL_Fav_UnfComment (&Com);
/***** Write HTML inside DIV with form to fav *****/ /***** Write HTML inside DIV with form to fav *****/
TL_Fav_PutFormToFavUnfComment (&SocCom,TL_SHOW_FEW_USRS); TL_Fav_PutFormToFavUnfComment (&Com,TL_SHOW_FEW_USRS);
} }
void TL_Fav_PutFormToFavUnfComment (const struct TL_Comment *SocCom, void TL_Fav_PutFormToFavUnfComment (const struct TL_Comment *Com,
TL_HowManyUsrs_t HowManyUsrs) TL_HowManyUsrs_t HowManyUsrs)
{ {
bool IAmTheAuthor; bool IAmTheAuthor;
bool IAmAFaverOfThisSocCom; bool IAmAFaverOfThisCom;
/***** Put form to fav/unfav this comment *****/ /***** Put form to fav/unfav this comment *****/
HTM_DIV_Begin ("class=\"TL_ICO\""); HTM_DIV_Begin ("class=\"TL_ICO\"");
IAmTheAuthor = Usr_ItsMe (SocCom->UsrCod); IAmTheAuthor = Usr_ItsMe (Com->UsrCod);
if (IAmTheAuthor) // I am the author if (IAmTheAuthor) // I am the author
/* Put disabled icon */ /* Put disabled icon */
TL_Fav_PutDisabledIconFav (SocCom->NumFavs); TL_Fav_PutDisabledIconFav (Com->NumFavs);
else // I am not the author else // I am not the author
{ {
/* Put icon to mark this comment as favourite */ /* Put icon to mark this comment as favourite */
IAmAFaverOfThisSocCom = TL_Fav_CheckIfCommIsFavedByUsr (SocCom->PubCod, IAmAFaverOfThisCom = TL_Fav_CheckIfCommIsFavedByUsr (Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
if (IAmAFaverOfThisSocCom) // I have favourited this comment if (IAmAFaverOfThisCom) // I have favourited this comment
/* Put icon to unfav this publication and list of users */ /* Put icon to unfav this publication and list of users */
TL_Fav_PutFormToUnfComment (SocCom->PubCod); TL_Fav_PutFormToUnfComment (Com->PubCod);
else // I am not a favouriter else // I am not a favouriter
/* Put icon to fav this publication and list of users */ /* Put icon to fav this publication and list of users */
TL_Fav_PutFormToFavComment (SocCom->PubCod); TL_Fav_PutFormToFavComment (Com->PubCod);
} }
HTM_DIV_End (); HTM_DIV_End ();
/***** Show who have marked this comment as favourite *****/ /***** Show who have marked this comment as favourite *****/
TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (SocCom,HowManyUsrs); TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (Com,HowManyUsrs);
} }
static void TL_Fav_FavComment (struct TL_Comment *SocCom) static void TL_Fav_FavComment (struct TL_Comment *Com)
{ {
bool IAmTheAuthor; bool IAmTheAuthor;
/***** Initialize image *****/ /***** Initialize image *****/
Med_MediaConstructor (&SocCom->Content.Media); Med_MediaConstructor (&Com->Content.Media);
/***** Get data of comment *****/ /***** Get data of comment *****/
SocCom->PubCod = TL_GetParamPubCod (); Com->PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (SocCom); TL_GetDataOfCommByCod (Com);
if (SocCom->PubCod > 0) if (Com->PubCod > 0)
{ {
IAmTheAuthor = Usr_ItsMe (SocCom->UsrCod); IAmTheAuthor = Usr_ItsMe (Com->UsrCod);
if (!IAmTheAuthor) // I am not the author if (!IAmTheAuthor) // I am not the author
if (!TL_Fav_CheckIfCommIsFavedByUsr (SocCom->PubCod, if (!TL_Fav_CheckIfCommIsFavedByUsr (Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I have not yet favourited the comment Gbl.Usrs.Me.UsrDat.UsrCod)) // I have not yet favourited the comment
{ {
/***** Mark as favourite in database *****/ /***** Mark as favourite in database *****/
@ -434,58 +434,58 @@ static void TL_Fav_FavComment (struct TL_Comment *SocCom)
" (PubCod,UsrCod,TimeFav)" " (PubCod,UsrCod,TimeFav)"
" VALUES" " VALUES"
" (%ld,%ld,NOW())", " (%ld,%ld,NOW())",
SocCom->PubCod, Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
/* Update number of times this comment is favourited */ /* Update number of times this comment is favourited */
TL_Fav_GetNumTimesACommHasBeenFav (SocCom); TL_Fav_GetNumTimesACommHasBeenFav (Com);
/**** Create notification about favourite post /**** Create notification about favourite post
for the author of the post ***/ for the author of the post ***/
TL_CreateNotifToAuthor (SocCom->UsrCod,SocCom->PubCod,Ntf_EVENT_TIMELINE_FAV); TL_CreateNotifToAuthor (Com->UsrCod,Com->PubCod,Ntf_EVENT_TIMELINE_FAV);
} }
} }
/***** Free image *****/ /***** Free image *****/
Med_MediaDestructor (&SocCom->Content.Media); Med_MediaDestructor (&Com->Content.Media);
} }
static void TL_Fav_UnfComment (struct TL_Comment *SocCom) static void TL_Fav_UnfComment (struct TL_Comment *Com)
{ {
bool IAmTheAuthor; bool IAmTheAuthor;
/***** Initialize image *****/ /***** Initialize image *****/
Med_MediaConstructor (&SocCom->Content.Media); Med_MediaConstructor (&Com->Content.Media);
/***** Get data of comment *****/ /***** Get data of comment *****/
SocCom->PubCod = TL_GetParamPubCod (); Com->PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (SocCom); TL_GetDataOfCommByCod (Com);
if (SocCom->PubCod > 0) if (Com->PubCod > 0)
{ {
IAmTheAuthor = Usr_ItsMe (SocCom->UsrCod); IAmTheAuthor = Usr_ItsMe (Com->UsrCod);
if (SocCom->NumFavs && if (Com->NumFavs &&
!IAmTheAuthor) // I am not the author !IAmTheAuthor) // I am not the author
if (TL_Fav_CheckIfCommIsFavedByUsr (SocCom->PubCod, if (TL_Fav_CheckIfCommIsFavedByUsr (Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I have favourited the comment Gbl.Usrs.Me.UsrDat.UsrCod)) // I have favourited the comment
{ {
/***** Delete the mark as favourite from database *****/ /***** Delete the mark as favourite from database *****/
DB_QueryDELETE ("can not unfavourite comment", DB_QueryDELETE ("can not unfavourite comment",
"DELETE FROM tl_comments_fav" "DELETE FROM tl_comments_fav"
" WHERE PubCod=%ld AND UsrCod=%ld", " WHERE PubCod=%ld AND UsrCod=%ld",
SocCom->PubCod, Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Update number of times this comment is favourited *****/ /***** Update number of times this comment is favourited *****/
TL_Fav_GetNumTimesACommHasBeenFav (SocCom); TL_Fav_GetNumTimesACommHasBeenFav (Com);
/***** Mark possible notifications on this comment as removed *****/ /***** Mark possible notifications on this comment as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,SocCom->PubCod); Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,Com->PubCod);
} }
} }
/***** Free image *****/ /***** Free image *****/
Med_MediaDestructor (&SocCom->Content.Media); Med_MediaDestructor (&Com->Content.Media);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -518,48 +518,48 @@ static bool TL_Fav_CheckIfCommIsFavedByUsr (long PubCod,long UsrCod)
/*************** Get number of times a note has been favourited **************/ /*************** Get number of times a note has been favourited **************/
/*****************************************************************************/ /*****************************************************************************/
void TL_Fav_GetNumTimesANoteHasBeenFav (struct TL_Note *SocNot) void TL_Fav_GetNumTimesANoteHasBeenFav (struct TL_Note *Not)
{ {
/***** Get number of times (users) this note has been favourited *****/ /***** Get number of times (users) this note has been favourited *****/
SocNot->NumFavs = Not->NumFavs =
(unsigned) DB_QueryCOUNT ("can not get number of times" (unsigned) DB_QueryCOUNT ("can not get number of times"
" a note has been favourited", " a note has been favourited",
"SELECT COUNT(*) FROM tl_notes_fav" "SELECT COUNT(*) FROM tl_notes_fav"
" WHERE NotCod=%ld" " WHERE NotCod=%ld"
" AND UsrCod<>%ld", // Extra check " AND UsrCod<>%ld", // Extra check
SocNot->NotCod, Not->NotCod,
SocNot->UsrCod); // The author Not->UsrCod); // The author
} }
/*****************************************************************************/ /*****************************************************************************/
/************ Get number of times a comment has been favourited **************/ /************ Get number of times a comment has been favourited **************/
/*****************************************************************************/ /*****************************************************************************/
void TL_Fav_GetNumTimesACommHasBeenFav (struct TL_Comment *SocCom) void TL_Fav_GetNumTimesACommHasBeenFav (struct TL_Comment *Com)
{ {
/***** Get number of times (users) this comment has been favourited *****/ /***** Get number of times (users) this comment has been favourited *****/
SocCom->NumFavs = Com->NumFavs =
(unsigned) DB_QueryCOUNT ("can not get number of times" (unsigned) DB_QueryCOUNT ("can not get number of times"
" a comment has been favourited", " a comment has been favourited",
"SELECT COUNT(*) FROM tl_comments_fav" "SELECT COUNT(*) FROM tl_comments_fav"
" WHERE PubCod=%ld" " WHERE PubCod=%ld"
" AND UsrCod<>%ld", // Extra check " AND UsrCod<>%ld", // Extra check
SocCom->PubCod, Com->PubCod,
SocCom->UsrCod); // The author Com->UsrCod); // The author
} }
/*****************************************************************************/ /*****************************************************************************/
/************ Show users who have marked this note as favourite **************/ /************ Show users who have marked this note as favourite **************/
/*****************************************************************************/ /*****************************************************************************/
static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot, static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs) TL_HowManyUsrs_t HowManyUsrs)
{ {
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
unsigned NumFirstUsrs; unsigned NumFirstUsrs;
/***** Get users who have marked this note as favourite *****/ /***** Get users who have marked this note as favourite *****/
if (SocNot->NumFavs) if (Not->NumFavs)
/***** Get list of users from database *****/ /***** Get list of users from database *****/
NumFirstUsrs = NumFirstUsrs =
(unsigned) DB_QuerySELECT (&mysql_res,"can not get users", (unsigned) DB_QuerySELECT (&mysql_res,"can not get users",
@ -567,8 +567,8 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot,
" WHERE NotCod=%ld" " WHERE NotCod=%ld"
" AND UsrCod<>%ld" // Extra check " AND UsrCod<>%ld" // Extra check
" ORDER BY FavCod LIMIT %u", " ORDER BY FavCod LIMIT %u",
SocNot->NotCod, Not->NotCod,
SocNot->UsrCod, Not->UsrCod,
HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN : HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN :
TL_MAX_USRS_SHOWN); TL_MAX_USRS_SHOWN);
else else
@ -577,21 +577,21 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot,
/***** Show users *****/ /***** Show users *****/
/* Number of users */ /* Number of users */
HTM_DIV_Begin ("class=\"TL_NUM_USRS\""); HTM_DIV_Begin ("class=\"TL_NUM_USRS\"");
TL_ShowNumSharersOrFavers (SocNot->NumFavs); TL_ShowNumSharersOrFavers (Not->NumFavs);
HTM_DIV_End (); HTM_DIV_End ();
/* List users one by one */ /* List users one by one */
HTM_DIV_Begin ("class=\"TL_USRS\""); HTM_DIV_Begin ("class=\"TL_USRS\"");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumFavs,NumFirstUsrs); TL_ShowSharersOrFavers (&mysql_res,Not->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumFavs) // Not all are shown if (NumFirstUsrs < Not->NumFavs) // Not all are shown
/* Clickable ellipsis to show all users */ /* Clickable ellipsis to show all users */
TL_PutFormToSeeAllFaversSharers (ActAllFavSocNotGbl,ActAllFavSocNotUsr, TL_PutFormToSeeAllFaversSharers (ActAllFavTL_NotGbl,ActAllFavTL_NotUsr,
"NotCod=%ld",SocNot->NotCod, "NotCod=%ld",Not->NotCod,
HowManyUsrs); HowManyUsrs);
HTM_DIV_End (); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
if (SocNot->NumFavs) if (Not->NumFavs)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }
@ -599,14 +599,14 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot,
/************ Show users who have marked this note as favourite **************/ /************ Show users who have marked this note as favourite **************/
/*****************************************************************************/ /*****************************************************************************/
static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocCom, static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *Com,
TL_HowManyUsrs_t HowManyUsrs) TL_HowManyUsrs_t HowManyUsrs)
{ {
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
unsigned NumFirstUsrs; unsigned NumFirstUsrs;
/***** Get users who have marked this comment as favourite *****/ /***** Get users who have marked this comment as favourite *****/
if (SocCom->NumFavs) if (Com->NumFavs)
/***** Get list of users from database *****/ /***** Get list of users from database *****/
NumFirstUsrs = NumFirstUsrs =
(unsigned) DB_QuerySELECT (&mysql_res,"can not get users", (unsigned) DB_QuerySELECT (&mysql_res,"can not get users",
@ -614,8 +614,8 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocC
" WHERE PubCod=%ld" " WHERE PubCod=%ld"
" AND UsrCod<>%ld" // Extra check " AND UsrCod<>%ld" // Extra check
" ORDER BY FavCod LIMIT %u", " ORDER BY FavCod LIMIT %u",
SocCom->PubCod, Com->PubCod,
SocCom->UsrCod, Com->UsrCod,
HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN : HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN :
TL_MAX_USRS_SHOWN); TL_MAX_USRS_SHOWN);
else else
@ -624,20 +624,20 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocC
/***** Show users *****/ /***** Show users *****/
/* Number of users */ /* Number of users */
HTM_DIV_Begin ("class=\"TL_NUM_USRS\""); HTM_DIV_Begin ("class=\"TL_NUM_USRS\"");
TL_ShowNumSharersOrFavers (SocCom->NumFavs); TL_ShowNumSharersOrFavers (Com->NumFavs);
HTM_DIV_End (); HTM_DIV_End ();
/* List users one by one */ /* List users one by one */
HTM_DIV_Begin ("class=\"TL_USRS\""); HTM_DIV_Begin ("class=\"TL_USRS\"");
TL_ShowSharersOrFavers (&mysql_res,SocCom->NumFavs,NumFirstUsrs); TL_ShowSharersOrFavers (&mysql_res,Com->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocCom->NumFavs) if (NumFirstUsrs < Com->NumFavs)
/* Clickable ellipsis to show all users */ /* Clickable ellipsis to show all users */
TL_PutFormToSeeAllFaversSharers (ActAllFavSocComGbl,ActAllFavSocComUsr, TL_PutFormToSeeAllFaversSharers (ActAllFavTL_ComGbl,ActAllFavTL_ComUsr,
"PubCod=%ld",SocCom->PubCod, "PubCod=%ld",Com->PubCod,
HowManyUsrs); HowManyUsrs);
HTM_DIV_End (); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
if (SocCom->NumFavs) if (Com->NumFavs)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }

View File

@ -50,7 +50,7 @@ void TL_Fav_FavNoteUsr (void);
void TL_Fav_FavNoteGbl (void); void TL_Fav_FavNoteGbl (void);
void TL_Fav_UnfNoteUsr (void); void TL_Fav_UnfNoteUsr (void);
void TL_Fav_UnfNoteGbl (void); void TL_Fav_UnfNoteGbl (void);
void TL_Fav_PutFormToFavUnfNote (const struct TL_Note *SocNot, void TL_Fav_PutFormToFavUnfNote (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs); TL_HowManyUsrs_t HowManyUsrs);
void TL_Fav_ShowAllFaversComUsr (void); void TL_Fav_ShowAllFaversComUsr (void);
@ -59,10 +59,10 @@ void TL_Fav_FavCommentUsr (void);
void TL_Fav_FavCommentGbl (void); void TL_Fav_FavCommentGbl (void);
void TL_Fav_UnfCommentUsr (void); void TL_Fav_UnfCommentUsr (void);
void TL_Fav_UnfCommentGbl (void); void TL_Fav_UnfCommentGbl (void);
void TL_Fav_PutFormToFavUnfComment (const struct TL_Comment *SocCom, void TL_Fav_PutFormToFavUnfComment (const struct TL_Comment *Com,
TL_HowManyUsrs_t HowManyUsrs); TL_HowManyUsrs_t HowManyUsrs);
void TL_Fav_GetNumTimesANoteHasBeenFav (struct TL_Note *SocNot); void TL_Fav_GetNumTimesANoteHasBeenFav (struct TL_Note *Not);
void TL_Fav_GetNumTimesACommHasBeenFav (struct TL_Comment *SocCom); void TL_Fav_GetNumTimesACommHasBeenFav (struct TL_Comment *Com);
#endif #endif

View File

@ -60,12 +60,12 @@ static void TL_Sha_PutDisabledIconShare (unsigned NumShared);
static void TL_Sha_PutFormToShaNote (long ParamCod); static void TL_Sha_PutFormToShaNote (long ParamCod);
static void TL_Sha_PutFormToUnsNote (long ParamCod); static void TL_Sha_PutFormToUnsNote (long ParamCod);
static void TL_Sha_ShaNote (struct TL_Note *SocNot); static void TL_Sha_ShaNote (struct TL_Note *Not);
static void TL_Sha_UnsNote (struct TL_Note *SocNot); static void TL_Sha_UnsNote (struct TL_Note *Not);
static bool TL_Sha_CheckIfNoteIsSharedByUsr (long NotCod,long UsrCod); static bool TL_Sha_CheckIfNoteIsSharedByUsr (long NotCod,long UsrCod);
static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Note *SocNot, static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs); TL_HowManyUsrs_t HowManyUsrs);
/*****************************************************************************/ /*****************************************************************************/
@ -99,7 +99,7 @@ static void TL_Sha_PutFormToShaNote (long ParamCod)
extern const char *Txt_Share; extern const char *Txt_Share;
/***** Form and icon to mark note as favourite *****/ /***** Form and icon to mark note as favourite *****/
TL_FormFavSha (ActShaSocNotGbl,ActShaSocNotUsr, TL_FormFavSha (ActShaTL_NotGbl,ActShaTL_NotUsr,
"NotCod=%ld",ParamCod, "NotCod=%ld",ParamCod,
TL_ICON_SHARE,Txt_Share); TL_ICON_SHARE,Txt_Share);
} }
@ -109,7 +109,7 @@ static void TL_Sha_PutFormToUnsNote (long ParamCod)
extern const char *Txt_TIMELINE_NOTE_Shared; extern const char *Txt_TIMELINE_NOTE_Shared;
/***** Form and icon to mark note as favourite *****/ /***** Form and icon to mark note as favourite *****/
TL_FormFavSha (ActUnsSocNotGbl,ActUnsSocNotUsr, TL_FormFavSha (ActUnsTL_NotGbl,ActUnsTL_NotUsr,
"NotCod=%ld",ParamCod, "NotCod=%ld",ParamCod,
TL_ICON_SHARED,Txt_TIMELINE_NOTE_Shared); TL_ICON_SHARED,Txt_TIMELINE_NOTE_Shared);
} }
@ -129,14 +129,14 @@ void TL_Sha_ShowAllSharersNoteUsr (void)
void TL_Sha_ShowAllSharersNoteGbl (void) void TL_Sha_ShowAllSharersNoteGbl (void)
{ {
struct TL_Note SocNot; struct TL_Note Not;
/***** Get data of note *****/ /***** Get data of note *****/
SocNot.NotCod = TL_GetParamNotCod (); Not.NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (&SocNot); TL_GetDataOfNoteByCod (&Not);
/***** Write HTML inside DIV with form to share/unshare *****/ /***** Write HTML inside DIV with form to share/unshare *****/
TL_Sha_PutFormToShaUnsNote (&SocNot,TL_SHOW_ALL_USRS); TL_Sha_PutFormToShaUnsNote (&Not,TL_SHOW_ALL_USRS);
} }
void TL_Sha_ShaNoteUsr (void) void TL_Sha_ShaNoteUsr (void)
@ -150,47 +150,47 @@ void TL_Sha_ShaNoteUsr (void)
void TL_Sha_ShaNoteGbl (void) void TL_Sha_ShaNoteGbl (void)
{ {
struct TL_Note SocNot; struct TL_Note Not;
/***** Share note *****/ /***** Share note *****/
TL_Sha_ShaNote (&SocNot); TL_Sha_ShaNote (&Not);
/***** Write HTML inside DIV with form to unshare *****/ /***** Write HTML inside DIV with form to unshare *****/
TL_Sha_PutFormToShaUnsNote (&SocNot,TL_SHOW_FEW_USRS); TL_Sha_PutFormToShaUnsNote (&Not,TL_SHOW_FEW_USRS);
} }
static void TL_Sha_ShaNote (struct TL_Note *SocNot) static void TL_Sha_ShaNote (struct TL_Note *Not)
{ {
// extern const char *Txt_The_original_post_no_longer_exists; // extern const char *Txt_The_original_post_no_longer_exists;
struct TL_Publication SocPub; struct TL_Publication Pub;
bool ItsMe; bool ItsMe;
long OriginalPubCod; long OriginalPubCod;
/***** Get data of note *****/ /***** Get data of note *****/
SocNot->NotCod = TL_GetParamNotCod (); Not->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (SocNot); TL_GetDataOfNoteByCod (Not);
if (SocNot->NotCod > 0) if (Not->NotCod > 0)
{ {
ItsMe = Usr_ItsMe (SocNot->UsrCod); ItsMe = Usr_ItsMe (Not->UsrCod);
if (Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author if (Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author
if (!TL_Sha_CheckIfNoteIsSharedByUsr (SocNot->NotCod, if (!TL_Sha_CheckIfNoteIsSharedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // Not yet shared by me Gbl.Usrs.Me.UsrDat.UsrCod)) // Not yet shared by me
{ {
/***** Share (publish note in timeline) *****/ /***** Share (publish note in timeline) *****/
SocPub.NotCod = SocNot->NotCod; Pub.NotCod = Not->NotCod;
SocPub.PublisherCod = Gbl.Usrs.Me.UsrDat.UsrCod; Pub.PublisherCod = Gbl.Usrs.Me.UsrDat.UsrCod;
SocPub.PubType = TL_PUB_SHARED_NOTE; Pub.PubType = TL_PUB_SHARED_NOTE;
TL_PublishNoteInTimeline (&SocPub); // Set SocPub.PubCod TL_PublishNoteInTimeline (&Pub); // Set Pub.PubCod
/* Update number of times this note is shared */ /* Update number of times this note is shared */
TL_Sha_UpdateNumTimesANoteHasBeenShared (SocNot); TL_Sha_UpdateNumTimesANoteHasBeenShared (Not);
/**** Create notification about shared post /**** Create notification about shared post
for the author of the post ***/ for the author of the post ***/
OriginalPubCod = TL_GetPubCodOfOriginalNote (SocNot->NotCod); OriginalPubCod = TL_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0) if (OriginalPubCod > 0)
TL_CreateNotifToAuthor (SocNot->UsrCod,OriginalPubCod,Ntf_EVENT_TIMELINE_SHARE); TL_CreateNotifToAuthor (Not->UsrCod,OriginalPubCod,Ntf_EVENT_TIMELINE_SHARE);
} }
} }
} }
@ -210,31 +210,31 @@ void TL_Sha_UnsNoteUsr (void)
void TL_Sha_UnsNoteGbl (void) void TL_Sha_UnsNoteGbl (void)
{ {
struct TL_Note SocNot; struct TL_Note Not;
/***** Unshare note *****/ /***** Unshare note *****/
TL_Sha_UnsNote (&SocNot); TL_Sha_UnsNote (&Not);
/***** Write HTML inside DIV with form to share *****/ /***** Write HTML inside DIV with form to share *****/
TL_Sha_PutFormToShaUnsNote (&SocNot,TL_SHOW_FEW_USRS); TL_Sha_PutFormToShaUnsNote (&Not,TL_SHOW_FEW_USRS);
} }
static void TL_Sha_UnsNote (struct TL_Note *SocNot) static void TL_Sha_UnsNote (struct TL_Note *Not)
{ {
// extern const char *Txt_The_original_post_no_longer_exists; // extern const char *Txt_The_original_post_no_longer_exists;
long OriginalPubCod; long OriginalPubCod;
bool ItsMe; bool ItsMe;
/***** Get data of note *****/ /***** Get data of note *****/
SocNot->NotCod = TL_GetParamNotCod (); Not->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (SocNot); TL_GetDataOfNoteByCod (Not);
if (SocNot->NotCod > 0) if (Not->NotCod > 0)
{ {
ItsMe = Usr_ItsMe (SocNot->UsrCod); ItsMe = Usr_ItsMe (Not->UsrCod);
if (SocNot->NumShared && if (Not->NumShared &&
Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author Gbl.Usrs.Me.Logged && !ItsMe) // I am not the author
if (TL_Sha_CheckIfNoteIsSharedByUsr (SocNot->NotCod, if (TL_Sha_CheckIfNoteIsSharedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I am a sharer Gbl.Usrs.Me.UsrDat.UsrCod)) // I am a sharer
{ {
/***** Delete publication from database *****/ /***** Delete publication from database *****/
@ -243,48 +243,48 @@ static void TL_Sha_UnsNote (struct TL_Note *SocNot)
" WHERE NotCod=%ld" " WHERE NotCod=%ld"
" AND PublisherCod=%ld" " AND PublisherCod=%ld"
" AND PubType=%u", " AND PubType=%u",
SocNot->NotCod, Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod, Gbl.Usrs.Me.UsrDat.UsrCod,
(unsigned) TL_PUB_SHARED_NOTE); (unsigned) TL_PUB_SHARED_NOTE);
/***** Update number of times this note is shared *****/ /***** Update number of times this note is shared *****/
TL_Sha_UpdateNumTimesANoteHasBeenShared (SocNot); TL_Sha_UpdateNumTimesANoteHasBeenShared (Not);
/***** Mark possible notifications on this note as removed *****/ /***** Mark possible notifications on this note as removed *****/
OriginalPubCod = TL_GetPubCodOfOriginalNote (SocNot->NotCod); OriginalPubCod = TL_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0) if (OriginalPubCod > 0)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_SHARE,OriginalPubCod); Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_SHARE,OriginalPubCod);
} }
} }
} }
void TL_Sha_PutFormToShaUnsNote (const struct TL_Note *SocNot, void TL_Sha_PutFormToShaUnsNote (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs) TL_HowManyUsrs_t HowManyUsrs)
{ {
bool IAmTheAuthor; bool IAmTheAuthor;
bool IAmASharerOfThisSocNot; bool IAmASharerOfThisNot;
/***** Put form to share/unshare this note *****/ /***** Put form to share/unshare this note *****/
HTM_DIV_Begin ("class=\"TL_ICO\""); HTM_DIV_Begin ("class=\"TL_ICO\"");
IAmTheAuthor = Usr_ItsMe (SocNot->UsrCod); IAmTheAuthor = Usr_ItsMe (Not->UsrCod);
if (SocNot->Unavailable || // Unavailable notes can not be shared if (Not->Unavailable || // Unavailable notes can not be shared
IAmTheAuthor) // I am the author IAmTheAuthor) // I am the author
/* Put disabled icon */ /* Put disabled icon */
TL_Sha_PutDisabledIconShare (SocNot->NumShared); TL_Sha_PutDisabledIconShare (Not->NumShared);
else // Available and I am not the author else // Available and I am not the author
{ {
/* Put icon to share/unshare */ /* Put icon to share/unshare */
IAmASharerOfThisSocNot = TL_Sha_CheckIfNoteIsSharedByUsr (SocNot->NotCod, IAmASharerOfThisNot = TL_Sha_CheckIfNoteIsSharedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
if (IAmASharerOfThisSocNot) // I have shared this note if (IAmASharerOfThisNot) // I have shared this note
TL_Sha_PutFormToUnsNote (SocNot->NotCod); TL_Sha_PutFormToUnsNote (Not->NotCod);
else // I have not shared this note else // I have not shared this note
TL_Sha_PutFormToShaNote (SocNot->NotCod); TL_Sha_PutFormToShaNote (Not->NotCod);
} }
HTM_DIV_End (); HTM_DIV_End ();
/***** Show who have shared this note *****/ /***** Show who have shared this note *****/
TL_Sha_ShowUsrsWhoHaveSharedNote (SocNot,HowManyUsrs); TL_Sha_ShowUsrsWhoHaveSharedNote (Not,HowManyUsrs);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -307,18 +307,18 @@ static bool TL_Sha_CheckIfNoteIsSharedByUsr (long NotCod,long UsrCod)
/********** Get number of times a note has been shared in timeline ***********/ /********** Get number of times a note has been shared in timeline ***********/
/*****************************************************************************/ /*****************************************************************************/
void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *SocNot) void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *Not)
{ {
/***** Get number of times (users) this note has been shared *****/ /***** Get number of times (users) this note has been shared *****/
SocNot->NumShared = Not->NumShared =
(unsigned) DB_QueryCOUNT ("can not get number of times" (unsigned) DB_QueryCOUNT ("can not get number of times"
" a note has been shared", " a note has been shared",
"SELECT COUNT(*) FROM tl_pubs" "SELECT COUNT(*) FROM tl_pubs"
" WHERE NotCod=%ld" " WHERE NotCod=%ld"
" AND PublisherCod<>%ld" " AND PublisherCod<>%ld"
" AND PubType=%u", " AND PubType=%u",
SocNot->NotCod, Not->NotCod,
SocNot->UsrCod, // The author Not->UsrCod, // The author
(unsigned) TL_PUB_SHARED_NOTE); (unsigned) TL_PUB_SHARED_NOTE);
} }
@ -326,14 +326,14 @@ void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *SocNot)
/******************* Show users who have shared this note ********************/ /******************* Show users who have shared this note ********************/
/*****************************************************************************/ /*****************************************************************************/
static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Note *SocNot, static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs) TL_HowManyUsrs_t HowManyUsrs)
{ {
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
unsigned NumFirstUsrs; unsigned NumFirstUsrs;
/***** Get users who have shared this note *****/ /***** Get users who have shared this note *****/
if (SocNot->NumShared) if (Not->NumShared)
NumFirstUsrs = NumFirstUsrs =
(unsigned) DB_QuerySELECT (&mysql_res,"can not get users", (unsigned) DB_QuerySELECT (&mysql_res,"can not get users",
"SELECT PublisherCod FROM tl_pubs" "SELECT PublisherCod FROM tl_pubs"
@ -341,8 +341,8 @@ static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Note *SocNot,
" AND PublisherCod<>%ld" " AND PublisherCod<>%ld"
" AND PubType=%u" " AND PubType=%u"
" ORDER BY PubCod LIMIT %u", " ORDER BY PubCod LIMIT %u",
SocNot->NotCod, Not->NotCod,
SocNot->UsrCod, Not->UsrCod,
(unsigned) TL_PUB_SHARED_NOTE, (unsigned) TL_PUB_SHARED_NOTE,
HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN : HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN :
TL_MAX_USRS_SHOWN); TL_MAX_USRS_SHOWN);
@ -352,20 +352,20 @@ static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Note *SocNot,
/***** Show users *****/ /***** Show users *****/
/* Number of users */ /* Number of users */
HTM_DIV_Begin ("class=\"TL_NUM_USRS\""); HTM_DIV_Begin ("class=\"TL_NUM_USRS\"");
TL_ShowNumSharersOrFavers (SocNot->NumShared); TL_ShowNumSharersOrFavers (Not->NumShared);
HTM_DIV_End (); HTM_DIV_End ();
/* List users one by one */ /* List users one by one */
HTM_DIV_Begin ("class=\"TL_USRS\""); HTM_DIV_Begin ("class=\"TL_USRS\"");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumShared,NumFirstUsrs); TL_ShowSharersOrFavers (&mysql_res,Not->NumShared,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumShared) if (NumFirstUsrs < Not->NumShared)
/* Clickable ellipsis to show all users */ /* Clickable ellipsis to show all users */
TL_PutFormToSeeAllFaversSharers (ActAllShaSocNotGbl,ActAllShaSocNotUsr, TL_PutFormToSeeAllFaversSharers (ActAllShaTL_NotGbl,ActAllShaTL_NotUsr,
"NotCod=%ld",SocNot->NotCod, "NotCod=%ld",Not->NotCod,
HowManyUsrs); HowManyUsrs);
HTM_DIV_End (); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
if (SocNot->NumShared) if (Not->NumShared)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }

View File

@ -45,9 +45,9 @@ void TL_Sha_ShaNoteUsr (void);
void TL_Sha_ShaNoteGbl (void); void TL_Sha_ShaNoteGbl (void);
void TL_Sha_UnsNoteUsr (void); void TL_Sha_UnsNoteUsr (void);
void TL_Sha_UnsNoteGbl (void); void TL_Sha_UnsNoteGbl (void);
void TL_Sha_PutFormToShaUnsNote (const struct TL_Note *SocNot, void TL_Sha_PutFormToShaUnsNote (const struct TL_Note *Not,
TL_HowManyUsrs_t HowManyUsrs); TL_HowManyUsrs_t HowManyUsrs);
void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *SocNot); void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *Not);
#endif #endif

View File

@ -3124,7 +3124,7 @@ void Usr_ChkUsrAndGetUsrData (void)
/* Get the first option allowed */ /* Get the first option allowed */
Action = Mnu_GetFirstActionAvailableInCurrentTab (); Action = Mnu_GetFirstActionAvailableInCurrentTab ();
Gbl.Action.Act = (Action == ActUnk) ? ((Gbl.Usrs.Me.Logged) ? ActSeeSocTmlGbl : // Default action if logged Gbl.Action.Act = (Action == ActUnk) ? ((Gbl.Usrs.Me.Logged) ? ActSeeTmlGbl : // Default action if logged
ActFrmLogIn) : // Default action if not logged ActFrmLogIn) : // Default action if not logged
Action; Action;
Tab_SetCurrentTab (); Tab_SetCurrentTab ();