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 **************************/
/*****************************************************************************/
#define Act_DEFAULT_ACTION_AFTER_LOGIN ActSeeSocTmlGbl
#define Act_DEFAULT_ACTION_AFTER_LOGIN ActSeeTmlGbl
const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
{
@ -125,7 +125,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
// 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" },
[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" },
[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" },
@ -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},
[ActRefNewSocPubGbl ] = {1509,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActRcvSocPstGbl ] = {1492,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActShoHidSocComGbl ] = {1806,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActAllFavSocNotGbl ] = {1767,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActShaSocNotGbl ] = {1495,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActFavSocNotGbl ] = {1512,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActFavSocComGbl ] = {1516,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActReqRemSocPubGbl ] = {1494,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActReqRemSocComGbl ] = {1505,-1,TabUnk,ActSeeSocTmlGbl ,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},
[ActRefNewTL_PubGbl ] = {1509,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_AJAX_RFRESH,TL_GetParamWho ,TL_RefreshNewTimelineGbl ,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},
[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},
[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},
[ActShoHidTL_ComGbl ] = {1806,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_ShowHiddenCommentsGbl ,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},
[ActAllFavTL_NotGbl ] = {1767,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteGbl ,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},
[ActShaTL_NotGbl ] = {1495,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShaNoteGbl ,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},
[ActFavTL_NotGbl ] = {1512,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteGbl ,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},
[ActFavTL_ComGbl ] = {1516,-1,TabUnk,ActSeeTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentGbl ,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},
[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},
[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},
[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},
[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},
[ActRefOldSocPubUsr ] = {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},
[ActRcvSocComUsr ] = {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},
[ActAllShaSocNotUsr ] = {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},
[ActAllFavSocComUsr ] = {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},
[ActUnsSocNotUsr ] = {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},
[ActUnfSocNotUsr ] = {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},
[ActUnfSocComUsr ] = {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},
[ActRemSocPubUsr ] = {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},
[ActRemSocComUsr ] = {1508,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveComUsr ,NULL},
[ActRefOldTL_PubUsr ] = {1511,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_RefreshOldTimelineUsr ,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},
[ActRcvTL_ComUsr ] = {1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceiveCommentUsr ,NULL},
[ActShoHidTL_ComUsr ] = {1807,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_ShowHiddenCommentsUsr ,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},
[ActAllFavTL_NotUsr ] = {1770,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteUsr ,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},
[ActShaTL_NotUsr ] = {1499,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShaNoteUsr ,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},
[ActFavTL_NotUsr ] = {1514,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteUsr ,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},
[ActFavTL_ComUsr ] = {1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentUsr ,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},
[ActReqRemTL_PubUsr ] = {1501,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemNoteUsr ,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},
[ActReqRemTL_ComUsr ] = {1506,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemComUsr ,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},
[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
ActReqRemOldBrf, // #1488
ActRemOldBrf, // #1489
ActSeeSocTmlGbl, // #1490
ActSeeTmlGbl, // #1490
-1, // #1491 (obsolete action)
ActRcvSocPstGbl, // #1492
ActRemSocPubGbl, // #1493
ActReqRemSocPubGbl, // #1494
ActShaSocNotGbl, // #1495
ActUnsSocNotGbl, // #1496
ActRcvTL_PstGbl, // #1492
ActRemTL_PubGbl, // #1493
ActReqRemTL_PubGbl, // #1494
ActShaTL_NotGbl, // #1495
ActUnsTL_NotGbl, // #1496
-1, // #1497 (obsolete action)
ActRcvSocPstUsr, // #1498
ActShaSocNotUsr, // #1499
ActUnsSocNotUsr, // #1500
ActReqRemSocPubUsr, // #1501
ActRemSocPubUsr, // #1502
ActRcvSocComGbl, // #1503
ActRcvSocComUsr, // #1504
ActReqRemSocComGbl, // #1505
ActReqRemSocComUsr, // #1506
ActRemSocComGbl, // #1507
ActRemSocComUsr, // #1508
ActRefNewSocPubGbl, // #1509
ActRefOldSocPubGbl, // #1510
ActRefOldSocPubUsr, // #1511
ActFavSocNotGbl, // #1512
ActUnfSocNotGbl, // #1513
ActFavSocNotUsr, // #1514
ActUnfSocNotUsr, // #1515
ActFavSocComGbl, // #1516
ActUnfSocComGbl, // #1517
ActFavSocComUsr, // #1518
ActUnfSocComUsr, // #1519
ActRcvTL_PstUsr, // #1498
ActShaTL_NotUsr, // #1499
ActUnsTL_NotUsr, // #1500
ActReqRemTL_PubUsr, // #1501
ActRemTL_PubUsr, // #1502
ActRcvTL_ComGbl, // #1503
ActRcvTL_ComUsr, // #1504
ActReqRemTL_ComGbl, // #1505
ActReqRemTL_ComUsr, // #1506
ActRemTL_ComGbl, // #1507
ActRemTL_ComUsr, // #1508
ActRefNewTL_PubGbl, // #1509
ActRefOldTL_PubGbl, // #1510
ActRefOldTL_PubUsr, // #1511
ActFavTL_NotGbl, // #1512
ActUnfTL_NotGbl, // #1513
ActFavTL_NotUsr, // #1514
ActUnfTL_NotUsr, // #1515
ActFavTL_ComGbl, // #1516
ActUnfTL_ComGbl, // #1517
ActFavTL_ComUsr, // #1518
ActUnfTL_ComUsr, // #1519
ActSeeSocPrf, // #1520
ActFrmLogIn, // #1521
ActUpdSignUpReq, // #1522
@ -3585,12 +3585,12 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActUnfSevTch, // #1763
ActChgCooPrf, // #1764
ActChgExtPriPrf, // #1765
ActAllShaSocNotGbl, // #1766
ActAllFavSocNotGbl, // #1767
ActAllFavSocComGbl, // #1768
ActAllShaSocNotUsr, // #1769
ActAllFavSocNotUsr, // #1770
ActAllFavSocComUsr, // #1771
ActAllShaTL_NotGbl, // #1766
ActAllFavTL_NotGbl, // #1767
ActAllFavTL_ComGbl, // #1768
ActAllShaTL_NotUsr, // #1769
ActAllFavTL_NotUsr, // #1770
ActAllFavTL_ComUsr, // #1771
ActReqMaiUsr, // #1772
ActLckPrj, // #1773
ActUnlPrj, // #1774
@ -3625,8 +3625,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActCfgPrj, // #1803
ActRcvCfgPrj, // #1804
ActReqUsrPrj, // #1805
ActShoHidSocComGbl, // #1806
ActShoHidSocComUsr, // #1807
ActShoHidTL_ComGbl, // #1806
ActShoHidTL_ComUsr, // #1807
ActSeeMchAnsQstStd, // #1808
ActRemMchAnsQstStd, // #1809
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
#define ActFrmLogIn (ActWebSvc + 1)
#define ActReqSch (ActWebSvc + 2)
#define ActSeeSocTmlGbl (ActWebSvc + 3)
#define ActSeeTmlGbl (ActWebSvc + 3)
#define ActSeeSocPrf (ActWebSvc + 4)
#define ActSeeCal (ActWebSvc + 5)
#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 ActRefNewSocPubGbl (ActWebSvc + 15)
#define ActRefOldSocPubGbl (ActWebSvc + 16)
#define ActRcvSocPstGbl (ActWebSvc + 17)
#define ActRcvSocComGbl (ActWebSvc + 18)
#define ActShoHidSocComGbl (ActWebSvc + 19)
#define ActAllShaSocNotGbl (ActWebSvc + 20)
#define ActAllFavSocNotGbl (ActWebSvc + 21)
#define ActAllFavSocComGbl (ActWebSvc + 22)
#define ActShaSocNotGbl (ActWebSvc + 23)
#define ActUnsSocNotGbl (ActWebSvc + 24)
#define ActFavSocNotGbl (ActWebSvc + 25)
#define ActUnfSocNotGbl (ActWebSvc + 26)
#define ActFavSocComGbl (ActWebSvc + 27)
#define ActUnfSocComGbl (ActWebSvc + 28)
#define ActReqRemSocPubGbl (ActWebSvc + 29)
#define ActRemSocPubGbl (ActWebSvc + 30)
#define ActReqRemSocComGbl (ActWebSvc + 31)
#define ActRemSocComGbl (ActWebSvc + 32)
#define ActRefNewTL_PubGbl (ActWebSvc + 15)
#define ActRefOldTL_PubGbl (ActWebSvc + 16)
#define ActRcvTL_PstGbl (ActWebSvc + 17)
#define ActRcvTL_ComGbl (ActWebSvc + 18)
#define ActShoHidTL_ComGbl (ActWebSvc + 19)
#define ActAllShaTL_NotGbl (ActWebSvc + 20)
#define ActAllFavTL_NotGbl (ActWebSvc + 21)
#define ActAllFavTL_ComGbl (ActWebSvc + 22)
#define ActShaTL_NotGbl (ActWebSvc + 23)
#define ActUnsTL_NotGbl (ActWebSvc + 24)
#define ActFavTL_NotGbl (ActWebSvc + 25)
#define ActUnfTL_NotGbl (ActWebSvc + 26)
#define ActFavTL_ComGbl (ActWebSvc + 27)
#define ActUnfTL_ComGbl (ActWebSvc + 28)
#define ActReqRemTL_PubGbl (ActWebSvc + 29)
#define ActRemTL_PubGbl (ActWebSvc + 30)
#define ActReqRemTL_ComGbl (ActWebSvc + 31)
#define ActRemTL_ComGbl (ActWebSvc + 32)
#define ActReqOthPubPrf (ActWebSvc + 33)
#define ActRefOldSocPubUsr (ActWebSvc + 34)
#define ActRcvSocPstUsr (ActWebSvc + 35)
#define ActRcvSocComUsr (ActWebSvc + 36)
#define ActShoHidSocComUsr (ActWebSvc + 37)
#define ActAllShaSocNotUsr (ActWebSvc + 38)
#define ActAllFavSocNotUsr (ActWebSvc + 39)
#define ActAllFavSocComUsr (ActWebSvc + 40)
#define ActShaSocNotUsr (ActWebSvc + 41)
#define ActUnsSocNotUsr (ActWebSvc + 42)
#define ActFavSocNotUsr (ActWebSvc + 43)
#define ActUnfSocNotUsr (ActWebSvc + 44)
#define ActFavSocComUsr (ActWebSvc + 45)
#define ActUnfSocComUsr (ActWebSvc + 46)
#define ActReqRemSocPubUsr (ActWebSvc + 47)
#define ActRemSocPubUsr (ActWebSvc + 48)
#define ActReqRemSocComUsr (ActWebSvc + 49)
#define ActRemSocComUsr (ActWebSvc + 50)
#define ActRefOldTL_PubUsr (ActWebSvc + 34)
#define ActRcvTL_PstUsr (ActWebSvc + 35)
#define ActRcvTL_ComUsr (ActWebSvc + 36)
#define ActShoHidTL_ComUsr (ActWebSvc + 37)
#define ActAllShaTL_NotUsr (ActWebSvc + 38)
#define ActAllFavTL_NotUsr (ActWebSvc + 39)
#define ActAllFavTL_ComUsr (ActWebSvc + 40)
#define ActShaTL_NotUsr (ActWebSvc + 41)
#define ActUnsTL_NotUsr (ActWebSvc + 42)
#define ActFavTL_NotUsr (ActWebSvc + 43)
#define ActUnfTL_NotUsr (ActWebSvc + 44)
#define ActFavTL_ComUsr (ActWebSvc + 45)
#define ActUnfTL_ComUsr (ActWebSvc + 46)
#define ActReqRemTL_PubUsr (ActWebSvc + 47)
#define ActRemTL_PubUsr (ActWebSvc + 48)
#define ActReqRemTL_ComUsr (ActWebSvc + 49)
#define ActRemTL_ComUsr (ActWebSvc + 50)
#define ActSeeOthPubPrf (ActWebSvc + 51)
#define ActCalFig (ActWebSvc + 52)

View File

@ -553,7 +553,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
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 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: 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.3: Feb 10, 2021 Code refactoring in timeline. (305122 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;
/* Timeline */
case ActSeeSocTmlGbl:
case ActRcvSocPstGbl:
case ActRcvSocComGbl:
case ActReqRemSocPubGbl:
case ActRemSocPubGbl:
case ActReqRemSocComGbl:
case ActRemSocComGbl:
case ActSeeTmlGbl:
case ActRcvTL_PstGbl:
case ActRcvTL_ComGbl:
case ActReqRemTL_PubGbl:
case ActRemTL_PubGbl:
case ActReqRemTL_ComGbl:
case ActRemTL_ComGbl:
RefreshNewTimeline = true;
break;
@ -874,31 +874,31 @@ static void Lay_WriteScriptParamsAJAX (void)
switch (Gbl.Action.Act)
{
/* Parameters related with global timeline refreshing */
case ActSeeSocTmlGbl:
case ActRcvSocPstGbl:
case ActRcvSocComGbl:
case ActReqRemSocPubGbl:
case ActRemSocPubGbl:
case ActReqRemSocComGbl:
case ActRemSocComGbl:
case ActSeeTmlGbl:
case ActRcvTL_PstGbl:
case ActRcvTL_ComGbl:
case ActReqRemTL_PubGbl:
case ActRemTL_PubGbl:
case ActReqRemTL_ComGbl:
case ActRemTL_ComGbl:
/* In all the actions related to view or editing global timeline ==>
put parameters used by AJAX */
// Refresh parameters
HTM_TxtF ("var RefreshParamNxtActNewPub = \"act=%ld\";\n"
"var RefreshParamNxtActOldPub = \"act=%ld\";\n"
"var RefreshParamWho = \"Who=%u\";\n",
Act_GetActCod (ActRefNewSocPubGbl),
Act_GetActCod (ActRefOldSocPubGbl),
Act_GetActCod (ActRefNewTL_PubGbl),
Act_GetActCod (ActRefOldTL_PubGbl),
(unsigned) TL_GetGlobalWho ()); // Global variable got in a priori function
break;
/* Parameters related with user timeline refreshing */
case ActSeeOthPubPrf:
case ActRcvSocPstUsr:
case ActRcvSocComUsr:
case ActReqRemSocPubUsr:
case ActRemSocPubUsr:
case ActReqRemSocComUsr:
case ActRemSocComUsr:
case ActRcvTL_PstUsr:
case ActRcvTL_ComUsr:
case ActReqRemTL_PubUsr:
case ActRemTL_PubUsr:
case ActReqRemTL_ComUsr:
case ActRemTL_ComUsr:
/* In all the actions related to view or editing user's timeline ==>
put parameters used by AJAX */
if (Gbl.Usrs.Other.UsrDat.UsrCod <= 0)
@ -906,7 +906,7 @@ static void Lay_WriteScriptParamsAJAX (void)
// Refresh parameters
HTM_TxtF ("var RefreshParamNxtActOldPub = \"act=%ld\";\n"
"var RefreshParamUsr = \"OtherUsrCod=%s\";\n",
Act_GetActCod (ActRefOldSocPubUsr),
Act_GetActCod (ActRefOldTL_PubUsr),
Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
break;
/* 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] = {
[ 0] = ActFrmLogIn,
[ 1] = ActReqSch,
[ 2] = ActSeeSocTmlGbl,
[ 2] = ActSeeTmlGbl,
[ 3] = ActSeeSocPrf,
[ 4] = ActSeeCal,
[ 5] = ActSeeNtf,

View File

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

View File

@ -1334,7 +1334,7 @@ void Prf_IncrementNumClicksUsr (long UsrCod)
/********* Increment number of social publications sent by a user ************/
/*****************************************************************************/
void Prf_IncrementNumSocPubUsr (long UsrCod)
void Prf_IncrementNumPubsUsr (long UsrCod)
{
/***** Increment number of social publications *****/
// 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_RemoveUsrFigures (long UsrCod);
void Prf_IncrementNumClicksUsr (long UsrCod);
void Prf_IncrementNumSocPubUsr (long UsrCod);
void Prf_IncrementNumPubsUsr (long UsrCod);
void Prf_IncrementNumFileViewsUsr (long UsrCod);
void Prf_IncrementNumForPstUsr (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"
#endif
,
// 2: ActSeeSocTmlGbl
// 2: ActSeeTmlGbl
#if L==1 // ca
"Timeline"
#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"
#endif
,
// 2: ActSeeSocTmlGbl
// 2: ActSeeTmlGbl
#if L==1 // ca
"Timeline dels usuaris que segueixo o de tots els usuaris"
#elif L==2 // de

View File

@ -188,7 +188,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Request search" // Precisa de tradução
#endif
,
[ActSeeSocTmlGbl] =
[ActSeeTmlGbl] =
#if L==1 // ca
"Show timeline global" // Necessita traducció
#elif L==2 // de
@ -440,7 +440,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Search" // Precisa de tradução
#endif
,
[ActRefNewSocPubGbl] =
[ActRefNewTL_PubGbl] =
#if L==1 // ca
"Refresh global timeline (new publications)" // Necessita traducció
#elif L==2 // de
@ -461,7 +461,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Refresh global timeline (new publications)" // Precisa de tradução
#endif
,
[ActRefOldSocPubGbl] =
[ActRefOldTL_PubGbl] =
#if L==1 // ca
"Show previous publications in global timeline" // Necessita traducció
#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
#endif
,
[ActRcvSocPstGbl] =
[ActRcvTL_PstGbl] =
#if L==1 // ca
"Create post in global timeline" // Necessita traducció
#elif L==2 // de
@ -503,7 +503,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create post in global timeline" // Precisa de tradução
#endif
,
[ActRcvSocComGbl] =
[ActRcvTL_ComGbl] =
#if L==1 // ca
"Create comment in global timeline" // Necessita traducció
#elif L==2 // de
@ -524,7 +524,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create comment in global timeline" // Precisa de tradução
#endif
,
[ActShoHidSocComGbl] =
[ActShoHidTL_ComGbl] =
#if L==1 // ca
"Show hidden comments in global timeline" // Necessita traducció
#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
#endif
,
[ActAllShaSocNotGbl] =
[ActAllShaTL_NotGbl] =
#if L==1 // ca
"Show who shared a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActAllFavSocNotGbl] =
[ActAllFavTL_NotGbl] =
#if L==1 // ca
"Show who favourited a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActAllFavSocComGbl] =
[ActAllFavTL_ComGbl] =
#if L==1 // ca
"Show who favourited a comment in global timeline" // Necessita traducció
#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
#endif
,
[ActShaSocNotGbl] =
[ActShaTL_NotGbl] =
#if L==1 // ca
"Share a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActUnsSocNotGbl] =
[ActUnsTL_NotGbl] =
#if L==1 // ca
"Unshare a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActFavSocNotGbl] =
[ActFavTL_NotGbl] =
#if L==1 // ca
"Favourite a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActUnfSocNotGbl] =
[ActUnfTL_NotGbl] =
#if L==1 // ca
"Unfavourite a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActFavSocComGbl] =
[ActFavTL_ComGbl] =
#if L==1 // ca
"Favourite a comment in global timeline" // Necessita traducció
#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
#endif
,
[ActUnfSocComGbl] =
[ActUnfTL_ComGbl] =
#if L==1 // ca
"Unfavourite a comment in global timeline" // Necessita traducció
#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
#endif
,
[ActReqRemSocPubGbl] =
[ActReqRemTL_PubGbl] =
#if L==1 // ca
"Request deletion of a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActRemSocPubGbl] =
[ActRemTL_PubGbl] =
#if L==1 // ca
"Delete a publication in global timeline" // Necessita traducció
#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
#endif
,
[ActReqRemSocComGbl] =
[ActReqRemTL_ComGbl] =
#if L==1 // ca
"Request deletion of a comment in global timeline" // Necessita traducció
#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
#endif
,
[ActRemSocComGbl] =
[ActRemTL_ComGbl] =
#if L==1 // ca
"Delete a comment in global timeline" // Necessita traducció
#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
#endif
,
[ActRefOldSocPubUsr] =
[ActRefOldTL_PubUsr] =
#if L==1 // ca
"Show previous publications in user timeline" // Necessita traducció
#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
#endif
,
[ActRcvSocPstUsr] =
[ActRcvTL_PstUsr] =
#if L==1 // ca
"Create post in user timeline" // Necessita traducció
#elif L==2 // de
@ -881,7 +881,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create post in user timeline" // Precisa de tradução
#endif
,
[ActRcvSocComUsr] =
[ActRcvTL_ComUsr] =
#if L==1 // ca
"Create comment in user timeline" // Necessita traducció
#elif L==2 // de
@ -902,7 +902,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Create comment in user timeline" // Precisa de tradução
#endif
,
[ActShoHidSocComUsr] =
[ActShoHidTL_ComUsr] =
#if L==1 // ca
"Show hidden comments in user timeline" // Necessita traducció
#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
#endif
,
[ActAllShaSocNotUsr] =
[ActAllShaTL_NotUsr] =
#if L==1 // ca
"Show who shared a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActAllFavSocNotUsr] =
[ActAllFavTL_NotUsr] =
#if L==1 // ca
"Show who favourited a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActAllFavSocComUsr] =
[ActAllFavTL_ComUsr] =
#if L==1 // ca
"Show who favourited a comment in user timeline" // Necessita traducció
#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
#endif
,
[ActShaSocNotUsr] =
[ActShaTL_NotUsr] =
#if L==1 // ca
"Share a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActUnsSocNotUsr] =
[ActUnsTL_NotUsr] =
#if L==1 // ca
"Unshare a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActFavSocNotUsr] =
[ActFavTL_NotUsr] =
#if L==1 // ca
"Favourite a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActUnfSocNotUsr] =
[ActUnfTL_NotUsr] =
#if L==1 // ca
"Unfavourite a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActFavSocComUsr] =
[ActFavTL_ComUsr] =
#if L==1 // ca
"Favourite a comment in user timeline" // Necessita traducció
#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
#endif
,
[ActUnfSocComUsr] =
[ActUnfTL_ComUsr] =
#if L==1 // ca
"Unfavourite a comment in user timeline" // Necessita traducció
#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
#endif
,
[ActReqRemSocPubUsr] =
[ActReqRemTL_PubUsr] =
#if L==1 // ca
"Request deletion of a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActRemSocPubUsr] =
[ActRemTL_PubUsr] =
#if L==1 // ca
"Delete a publication in user timeline" // Necessita traducció
#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
#endif
,
[ActReqRemSocComUsr] =
[ActReqRemTL_ComUsr] =
#if L==1 // ca
"Request deletion of a comment in user timeline" // Necessita traducció
#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
#endif
,
[ActRemSocComUsr] =
[ActRemTL_ComUsr] =
#if L==1 // ca
"Delete a comment in user timeline" // Necessita traducció
#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_MarkNotesChildrenOfFolderAsUnavailable (const char *Path);
void TL_PublishNoteInTimeline (struct TL_Publication *SocPub);
void TL_PublishNoteInTimeline (struct TL_Publication *Pub);
void TL_ReceivePostUsr (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 *Icon,const char *Title);
void TL_GetDataOfNoteByCod (struct TL_Note *SocNot);
void TL_GetDataOfCommByCod (struct TL_Comment *SocCom);
void TL_GetDataOfNoteByCod (struct TL_Note *Not);
void TL_GetDataOfCommByCod (struct TL_Comment *Com);
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_PutFormToUnfComment (long ParamCod);
static void TL_Fav_FavNote (struct TL_Note *SocNot);
static void TL_Fav_UnfNote (struct TL_Note *SocNot);
static void TL_Fav_FavNote (struct TL_Note *Not);
static void TL_Fav_UnfNote (struct TL_Note *Not);
static void TL_Fav_FavComment (struct TL_Comment *SocCom);
static void TL_Fav_UnfComment (struct TL_Comment *SocCom);
static void TL_Fav_FavComment (struct TL_Comment *Com);
static void TL_Fav_UnfComment (struct TL_Comment *Com);
static bool TL_Fav_CheckIfNoteIsFavedByUsr (long NotCod,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);
static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocCom,
static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *Com,
TL_HowManyUsrs_t HowManyUsrs);
/*****************************************************************************/
@ -108,7 +108,7 @@ static void TL_Fav_PutFormToFavNote (long ParamCod)
extern const char *Txt_Mark_as_favourite;
/***** Form and icon to mark note as favourite *****/
TL_FormFavSha (ActFavSocNotGbl,ActFavSocNotUsr,
TL_FormFavSha (ActFavTL_NotGbl,ActFavTL_NotUsr,
"NotCod=%ld",ParamCod,
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;
/***** Form and icon to unfav (remove mark as favourite) note *****/
TL_FormFavSha (ActUnfSocNotGbl,ActUnfSocNotUsr,
TL_FormFavSha (ActUnfTL_NotGbl,ActUnfTL_NotUsr,
"NotCod=%ld",ParamCod,
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;
/***** Form and icon to mark comment as favourite *****/
TL_FormFavSha (ActFavSocComGbl,ActFavSocComUsr,
TL_FormFavSha (ActFavTL_ComGbl,ActFavTL_ComUsr,
"PubCod=%ld",ParamCod,
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;
/***** Form and icon to unfav (remove mark as favourite) comment *****/
TL_FormFavSha (ActUnfSocComGbl,ActUnfSocComUsr,
TL_FormFavSha (ActUnfTL_ComGbl,ActUnfTL_ComUsr,
"PubCod=%ld",ParamCod,
TL_ICON_FAVED,Txt_TIMELINE_NOTE_Favourite);
}
@ -162,14 +162,14 @@ void TL_Fav_ShowAllFaversNoteUsr (void)
void TL_Fav_ShowAllFaversNoteGbl (void)
{
struct TL_Note SocNot;
struct TL_Note Not;
/***** Get data of note *****/
SocNot.NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (&SocNot);
Not.NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (&Not);
/***** 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)
@ -183,13 +183,13 @@ void TL_Fav_FavNoteUsr (void)
void TL_Fav_FavNoteGbl (void)
{
struct TL_Note SocNot;
struct TL_Note Not;
/***** Mark note as favourite *****/
TL_Fav_FavNote (&SocNot);
TL_Fav_FavNote (&Not);
/***** 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)
@ -203,58 +203,58 @@ void TL_Fav_UnfNoteUsr (void)
void TL_Fav_UnfNoteGbl (void)
{
struct TL_Note SocNot;
struct TL_Note Not;
/***** Stop marking as favourite a previously favourited note *****/
TL_Fav_UnfNote (&SocNot);
TL_Fav_UnfNote (&Not);
/***** 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)
{
bool IAmTheAuthor;
bool IAmAFaverOfThisSocNot;
bool IAmAFaverOfThisNot;
/***** Put form to fav/unfav this note *****/
HTM_DIV_Begin ("class=\"TL_ICO\"");
IAmTheAuthor = Usr_ItsMe (SocNot->UsrCod);
if (SocNot->Unavailable || // Unavailable notes can not be favourited
IAmTheAuthor = Usr_ItsMe (Not->UsrCod);
if (Not->Unavailable || // Unavailable notes can not be favourited
IAmTheAuthor) // I am the author
/* Put disabled icon */
TL_Fav_PutDisabledIconFav (SocNot->NumFavs);
TL_Fav_PutDisabledIconFav (Not->NumFavs);
else // Available and I am not the author
{
/* Put icon to fav/unfav */
IAmAFaverOfThisSocNot = TL_Fav_CheckIfNoteIsFavedByUsr (SocNot->NotCod,
IAmAFaverOfThisNot = TL_Fav_CheckIfNoteIsFavedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
if (IAmAFaverOfThisSocNot) // I have favourited this note
TL_Fav_PutFormToUnfNote (SocNot->NotCod);
if (IAmAFaverOfThisNot) // I have favourited this note
TL_Fav_PutFormToUnfNote (Not->NotCod);
else // I am not a faver of this note
TL_Fav_PutFormToFavNote (SocNot->NotCod);
TL_Fav_PutFormToFavNote (Not->NotCod);
}
HTM_DIV_End ();
/***** 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;
long OriginalPubCod;
/***** Get data of note *****/
SocNot->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (SocNot);
Not->NotCod = TL_GetParamNotCod ();
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 (!TL_Fav_CheckIfNoteIsFavedByUsr (SocNot->NotCod,
if (!TL_Fav_CheckIfNoteIsFavedByUsr (Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I have not yet favourited the note
{
/***** Mark as favourite in database *****/
@ -263,50 +263,50 @@ static void TL_Fav_FavNote (struct TL_Note *SocNot)
" (NotCod,UsrCod,TimeFav)"
" VALUES"
" (%ld,%ld,NOW())",
SocNot->NotCod,
Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Update number of times this note is favourited *****/
TL_Fav_GetNumTimesANoteHasBeenFav (SocNot);
TL_Fav_GetNumTimesANoteHasBeenFav (Not);
/***** Create notification about favourite post
for the author of the post *****/
OriginalPubCod = TL_GetPubCodOfOriginalNote (SocNot->NotCod);
OriginalPubCod = TL_GetPubCodOfOriginalNote (Not->NotCod);
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;
bool ItsMe;
/***** Get data of note *****/
SocNot->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (SocNot);
Not->NotCod = TL_GetParamNotCod ();
TL_GetDataOfNoteByCod (Not);
if (SocNot->NotCod > 0)
if (Not->NotCod > 0)
{
ItsMe = Usr_ItsMe (SocNot->UsrCod);
if (SocNot->NumFavs &&
ItsMe = Usr_ItsMe (Not->UsrCod);
if (Not->NumFavs &&
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
{
/***** Delete the mark as favourite from database *****/
DB_QueryDELETE ("can not unfavourite note",
"DELETE FROM tl_notes_fav"
" WHERE NotCod=%ld AND UsrCod=%ld",
SocNot->NotCod,
Not->NotCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Update number of times this note is favourited *****/
TL_Fav_GetNumTimesANoteHasBeenFav (SocNot);
TL_Fav_GetNumTimesANoteHasBeenFav (Not);
/***** Mark possible notifications on this note as removed *****/
OriginalPubCod = TL_GetPubCodOfOriginalNote (SocNot->NotCod);
OriginalPubCod = TL_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,OriginalPubCod);
}
@ -328,16 +328,16 @@ void TL_Fav_ShowAllFaversComUsr (void)
void TL_Fav_ShowAllFaversComGbl (void)
{
struct TL_Comment SocCom;
struct TL_Comment Com;
/***** Get data of comment *****/
Med_MediaConstructor (&SocCom.Content.Media);
SocCom.PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (&SocCom);
Med_MediaDestructor (&SocCom.Content.Media);
Med_MediaConstructor (&Com.Content.Media);
Com.PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (&Com);
Med_MediaDestructor (&Com.Content.Media);
/***** 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)
@ -351,13 +351,13 @@ void TL_Fav_FavCommentUsr (void)
void TL_Fav_FavCommentGbl (void)
{
struct TL_Comment SocCom;
struct TL_Comment Com;
/***** Mark comment as favourite *****/
TL_Fav_FavComment (&SocCom);
TL_Fav_FavComment (&Com);
/***** 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)
@ -371,61 +371,61 @@ void TL_Fav_UnfCommentUsr (void)
void TL_Fav_UnfCommentGbl (void)
{
struct TL_Comment SocCom;
struct TL_Comment Com;
/***** Stop marking as favourite a previously favourited comment *****/
TL_Fav_UnfComment (&SocCom);
TL_Fav_UnfComment (&Com);
/***** 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)
{
bool IAmTheAuthor;
bool IAmAFaverOfThisSocCom;
bool IAmAFaverOfThisCom;
/***** Put form to fav/unfav this comment *****/
HTM_DIV_Begin ("class=\"TL_ICO\"");
IAmTheAuthor = Usr_ItsMe (SocCom->UsrCod);
IAmTheAuthor = Usr_ItsMe (Com->UsrCod);
if (IAmTheAuthor) // I am the author
/* Put disabled icon */
TL_Fav_PutDisabledIconFav (SocCom->NumFavs);
TL_Fav_PutDisabledIconFav (Com->NumFavs);
else // I am not the author
{
/* 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);
if (IAmAFaverOfThisSocCom) // I have favourited this comment
if (IAmAFaverOfThisCom) // I have favourited this comment
/* 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
/* Put icon to fav this publication and list of users */
TL_Fav_PutFormToFavComment (SocCom->PubCod);
TL_Fav_PutFormToFavComment (Com->PubCod);
}
HTM_DIV_End ();
/***** 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;
/***** Initialize image *****/
Med_MediaConstructor (&SocCom->Content.Media);
Med_MediaConstructor (&Com->Content.Media);
/***** Get data of comment *****/
SocCom->PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (SocCom);
Com->PubCod = TL_GetParamPubCod ();
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 (!TL_Fav_CheckIfCommIsFavedByUsr (SocCom->PubCod,
if (!TL_Fav_CheckIfCommIsFavedByUsr (Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod)) // I have not yet favourited the comment
{
/***** Mark as favourite in database *****/
@ -434,58 +434,58 @@ static void TL_Fav_FavComment (struct TL_Comment *SocCom)
" (PubCod,UsrCod,TimeFav)"
" VALUES"
" (%ld,%ld,NOW())",
SocCom->PubCod,
Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
/* Update number of times this comment is favourited */
TL_Fav_GetNumTimesACommHasBeenFav (SocCom);
TL_Fav_GetNumTimesACommHasBeenFav (Com);
/**** Create notification about favourite 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 *****/
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;
/***** Initialize image *****/
Med_MediaConstructor (&SocCom->Content.Media);
Med_MediaConstructor (&Com->Content.Media);
/***** Get data of comment *****/
SocCom->PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (SocCom);
Com->PubCod = TL_GetParamPubCod ();
TL_GetDataOfCommByCod (Com);
if (SocCom->PubCod > 0)
if (Com->PubCod > 0)
{
IAmTheAuthor = Usr_ItsMe (SocCom->UsrCod);
if (SocCom->NumFavs &&
IAmTheAuthor = Usr_ItsMe (Com->UsrCod);
if (Com->NumFavs &&
!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
{
/***** Delete the mark as favourite from database *****/
DB_QueryDELETE ("can not unfavourite comment",
"DELETE FROM tl_comments_fav"
" WHERE PubCod=%ld AND UsrCod=%ld",
SocCom->PubCod,
Com->PubCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Update number of times this comment is favourited *****/
TL_Fav_GetNumTimesACommHasBeenFav (SocCom);
TL_Fav_GetNumTimesACommHasBeenFav (Com);
/***** 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 *****/
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 **************/
/*****************************************************************************/
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 *****/
SocNot->NumFavs =
Not->NumFavs =
(unsigned) DB_QueryCOUNT ("can not get number of times"
" a note has been favourited",
"SELECT COUNT(*) FROM tl_notes_fav"
" WHERE NotCod=%ld"
" AND UsrCod<>%ld", // Extra check
SocNot->NotCod,
SocNot->UsrCod); // The author
Not->NotCod,
Not->UsrCod); // The author
}
/*****************************************************************************/
/************ 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 *****/
SocCom->NumFavs =
Com->NumFavs =
(unsigned) DB_QueryCOUNT ("can not get number of times"
" a comment has been favourited",
"SELECT COUNT(*) FROM tl_comments_fav"
" WHERE PubCod=%ld"
" AND UsrCod<>%ld", // Extra check
SocCom->PubCod,
SocCom->UsrCod); // The author
Com->PubCod,
Com->UsrCod); // The author
}
/*****************************************************************************/
/************ 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)
{
MYSQL_RES *mysql_res;
unsigned NumFirstUsrs;
/***** Get users who have marked this note as favourite *****/
if (SocNot->NumFavs)
if (Not->NumFavs)
/***** Get list of users from database *****/
NumFirstUsrs =
(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"
" AND UsrCod<>%ld" // Extra check
" ORDER BY FavCod LIMIT %u",
SocNot->NotCod,
SocNot->UsrCod,
Not->NotCod,
Not->UsrCod,
HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN :
TL_MAX_USRS_SHOWN);
else
@ -577,21 +577,21 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot,
/***** Show users *****/
/* Number of users */
HTM_DIV_Begin ("class=\"TL_NUM_USRS\"");
TL_ShowNumSharersOrFavers (SocNot->NumFavs);
TL_ShowNumSharersOrFavers (Not->NumFavs);
HTM_DIV_End ();
/* List users one by one */
HTM_DIV_Begin ("class=\"TL_USRS\"");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumFavs) // Not all are shown
TL_ShowSharersOrFavers (&mysql_res,Not->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < Not->NumFavs) // Not all are shown
/* Clickable ellipsis to show all users */
TL_PutFormToSeeAllFaversSharers (ActAllFavSocNotGbl,ActAllFavSocNotUsr,
"NotCod=%ld",SocNot->NotCod,
TL_PutFormToSeeAllFaversSharers (ActAllFavTL_NotGbl,ActAllFavTL_NotUsr,
"NotCod=%ld",Not->NotCod,
HowManyUsrs);
HTM_DIV_End ();
/***** Free structure that stores the query result *****/
if (SocNot->NumFavs)
if (Not->NumFavs)
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 **************/
/*****************************************************************************/
static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocCom,
static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *Com,
TL_HowManyUsrs_t HowManyUsrs)
{
MYSQL_RES *mysql_res;
unsigned NumFirstUsrs;
/***** Get users who have marked this comment as favourite *****/
if (SocCom->NumFavs)
if (Com->NumFavs)
/***** Get list of users from database *****/
NumFirstUsrs =
(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"
" AND UsrCod<>%ld" // Extra check
" ORDER BY FavCod LIMIT %u",
SocCom->PubCod,
SocCom->UsrCod,
Com->PubCod,
Com->UsrCod,
HowManyUsrs == TL_SHOW_FEW_USRS ? TL_DEF_USRS_SHOWN :
TL_MAX_USRS_SHOWN);
else
@ -624,20 +624,20 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocC
/***** Show users *****/
/* Number of users */
HTM_DIV_Begin ("class=\"TL_NUM_USRS\"");
TL_ShowNumSharersOrFavers (SocCom->NumFavs);
TL_ShowNumSharersOrFavers (Com->NumFavs);
HTM_DIV_End ();
/* List users one by one */
HTM_DIV_Begin ("class=\"TL_USRS\"");
TL_ShowSharersOrFavers (&mysql_res,SocCom->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocCom->NumFavs)
TL_ShowSharersOrFavers (&mysql_res,Com->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < Com->NumFavs)
/* Clickable ellipsis to show all users */
TL_PutFormToSeeAllFaversSharers (ActAllFavSocComGbl,ActAllFavSocComUsr,
"PubCod=%ld",SocCom->PubCod,
TL_PutFormToSeeAllFaversSharers (ActAllFavTL_ComGbl,ActAllFavTL_ComUsr,
"PubCod=%ld",Com->PubCod,
HowManyUsrs);
HTM_DIV_End ();
/***** Free structure that stores the query result *****/
if (SocCom->NumFavs)
if (Com->NumFavs)
DB_FreeMySQLResult (&mysql_res);
}

View File

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

View File

@ -45,9 +45,9 @@ void TL_Sha_ShaNoteUsr (void);
void TL_Sha_ShaNoteGbl (void);
void TL_Sha_UnsNoteUsr (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);
void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *SocNot);
void TL_Sha_UpdateNumTimesANoteHasBeenShared (struct TL_Note *Not);
#endif

View File

@ -3124,7 +3124,7 @@ void Usr_ChkUsrAndGetUsrData (void)
/* Get the first option allowed */
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
Action;
Tab_SetCurrentTab ();