mirror of https://github.com/acanas/swad-core.git
Version 15.132
This commit is contained in:
parent
88d58c5583
commit
9bc3e2e446
|
@ -1222,6 +1222,8 @@ CREATE TABLE IF NOT EXISTS usr_data (
|
||||||
INDEX(IconSet),
|
INDEX(IconSet),
|
||||||
INDEX(Language),
|
INDEX(Language),
|
||||||
INDEX(FirstDayOfWeek),
|
INDEX(FirstDayOfWeek),
|
||||||
|
INDEX(PhotoVisibility),
|
||||||
|
INDEX(ProfileVisibility),
|
||||||
INDEX(CtyCod),
|
INDEX(CtyCod),
|
||||||
INDEX(InsCtyCod),
|
INDEX(InsCtyCod),
|
||||||
INDEX(InsCod),
|
INDEX(InsCod),
|
||||||
|
|
|
@ -1038,6 +1038,7 @@ Social:
|
||||||
869. ActCalNumForPst Calculate number of forum posts and store into user's figures
|
869. ActCalNumForPst Calculate number of forum posts and store into user's figures
|
||||||
870. ActCalNumMsgSnt Calculate number of messages sent from log and store into user's figures
|
870. ActCalNumMsgSnt Calculate number of messages sent from log and store into user's figures
|
||||||
|
|
||||||
|
NEW.....871. ActWhoFol Suggest list of users to follow
|
||||||
871. ActFolUsr Follow another user
|
871. ActFolUsr Follow another user
|
||||||
872. ActUnfUsr Unfollow another user
|
872. ActUnfUsr Unfollow another user
|
||||||
873. ActSeeFlg Show following
|
873. ActSeeFlg Show following
|
||||||
|
@ -2374,6 +2375,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActCalNumForPst */{1408,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_CalculateNumForPst ,NULL},
|
/* ActCalNumForPst */{1408,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_CalculateNumForPst ,NULL},
|
||||||
/* ActCalNumMsgSnt */{1407,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_CalculateNumMsgSnt ,NULL},
|
/* ActCalNumMsgSnt */{1407,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_CalculateNumMsgSnt ,NULL},
|
||||||
|
|
||||||
|
/* ActWhoFol */{1520,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_SuggestWhoToFollow ,NULL},
|
||||||
/* ActFolUsr */{1410,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_FollowUsr ,NULL},
|
/* ActFolUsr */{1410,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_FollowUsr ,NULL},
|
||||||
/* ActUnfUsr */{1411,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_UnfollowUsr ,NULL},
|
/* ActUnfUsr */{1411,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_UnfollowUsr ,NULL},
|
||||||
/* ActSeeFlg */{1412,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_ListFollowing ,NULL},
|
/* ActSeeFlg */{1412,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Fol_ListFollowing ,NULL},
|
||||||
|
@ -4233,6 +4235,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
|
||||||
ActUnfSocComGbl, // #1517
|
ActUnfSocComGbl, // #1517
|
||||||
ActFavSocComUsr, // #1518
|
ActFavSocComUsr, // #1518
|
||||||
ActUnfSocComUsr, // #1519
|
ActUnfSocComUsr, // #1519
|
||||||
|
ActWhoFol, // #1520
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
279
swad_action.h
279
swad_action.h
|
@ -71,9 +71,9 @@ typedef enum
|
||||||
|
|
||||||
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||||
|
|
||||||
#define Act_NUM_ACTIONS (1+9+52+15+90+72+67+205+183+143+171+36+27+82)
|
#define Act_NUM_ACTIONS (1+9+52+15+90+72+67+205+183+143+172+36+27+82)
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1519
|
#define Act_MAX_ACTION_COD 1520
|
||||||
|
|
||||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
|
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
|
||||||
|
|
||||||
|
@ -1080,145 +1080,146 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
|
||||||
#define ActCalNumForPst (ActLstClk+ 33)
|
#define ActCalNumForPst (ActLstClk+ 33)
|
||||||
#define ActCalNumMsgSnt (ActLstClk+ 34)
|
#define ActCalNumMsgSnt (ActLstClk+ 34)
|
||||||
|
|
||||||
#define ActFolUsr (ActLstClk+ 35)
|
#define ActWhoFol (ActLstClk+ 35)
|
||||||
#define ActUnfUsr (ActLstClk+ 36)
|
#define ActFolUsr (ActLstClk+ 36)
|
||||||
#define ActSeeFlg (ActLstClk+ 37)
|
#define ActUnfUsr (ActLstClk+ 37)
|
||||||
#define ActSeeFlr (ActLstClk+ 38)
|
#define ActSeeFlg (ActLstClk+ 38)
|
||||||
|
#define ActSeeFlr (ActLstClk+ 39)
|
||||||
|
|
||||||
#define ActSeeForCrsUsr (ActLstClk+ 39)
|
#define ActSeeForCrsUsr (ActLstClk+ 40)
|
||||||
#define ActSeeForCrsTch (ActLstClk+ 40)
|
#define ActSeeForCrsTch (ActLstClk+ 41)
|
||||||
#define ActSeeForDegUsr (ActLstClk+ 41)
|
#define ActSeeForDegUsr (ActLstClk+ 42)
|
||||||
#define ActSeeForDegTch (ActLstClk+ 42)
|
#define ActSeeForDegTch (ActLstClk+ 43)
|
||||||
#define ActSeeForCtrUsr (ActLstClk+ 43)
|
#define ActSeeForCtrUsr (ActLstClk+ 44)
|
||||||
#define ActSeeForCtrTch (ActLstClk+ 44)
|
#define ActSeeForCtrTch (ActLstClk+ 45)
|
||||||
#define ActSeeForInsUsr (ActLstClk+ 45)
|
#define ActSeeForInsUsr (ActLstClk+ 46)
|
||||||
#define ActSeeForInsTch (ActLstClk+ 46)
|
#define ActSeeForInsTch (ActLstClk+ 47)
|
||||||
#define ActSeeForGenUsr (ActLstClk+ 47)
|
#define ActSeeForGenUsr (ActLstClk+ 48)
|
||||||
#define ActSeeForGenTch (ActLstClk+ 48)
|
#define ActSeeForGenTch (ActLstClk+ 49)
|
||||||
#define ActSeeForSWAUsr (ActLstClk+ 49)
|
#define ActSeeForSWAUsr (ActLstClk+ 50)
|
||||||
#define ActSeeForSWATch (ActLstClk+ 50)
|
#define ActSeeForSWATch (ActLstClk+ 51)
|
||||||
#define ActSeePstForCrsUsr (ActLstClk+ 51)
|
#define ActSeePstForCrsUsr (ActLstClk+ 52)
|
||||||
#define ActSeePstForCrsTch (ActLstClk+ 52)
|
#define ActSeePstForCrsTch (ActLstClk+ 53)
|
||||||
#define ActSeePstForDegUsr (ActLstClk+ 53)
|
#define ActSeePstForDegUsr (ActLstClk+ 54)
|
||||||
#define ActSeePstForDegTch (ActLstClk+ 54)
|
#define ActSeePstForDegTch (ActLstClk+ 55)
|
||||||
#define ActSeePstForCtrUsr (ActLstClk+ 55)
|
#define ActSeePstForCtrUsr (ActLstClk+ 56)
|
||||||
#define ActSeePstForCtrTch (ActLstClk+ 56)
|
#define ActSeePstForCtrTch (ActLstClk+ 57)
|
||||||
#define ActSeePstForInsUsr (ActLstClk+ 57)
|
#define ActSeePstForInsUsr (ActLstClk+ 58)
|
||||||
#define ActSeePstForInsTch (ActLstClk+ 58)
|
#define ActSeePstForInsTch (ActLstClk+ 59)
|
||||||
#define ActSeePstForGenUsr (ActLstClk+ 59)
|
#define ActSeePstForGenUsr (ActLstClk+ 60)
|
||||||
#define ActSeePstForGenTch (ActLstClk+ 60)
|
#define ActSeePstForGenTch (ActLstClk+ 61)
|
||||||
#define ActSeePstForSWAUsr (ActLstClk+ 61)
|
#define ActSeePstForSWAUsr (ActLstClk+ 62)
|
||||||
#define ActSeePstForSWATch (ActLstClk+ 62)
|
#define ActSeePstForSWATch (ActLstClk+ 63)
|
||||||
#define ActRcvThrForCrsUsr (ActLstClk+ 63)
|
#define ActRcvThrForCrsUsr (ActLstClk+ 64)
|
||||||
#define ActRcvThrForCrsTch (ActLstClk+ 64)
|
#define ActRcvThrForCrsTch (ActLstClk+ 65)
|
||||||
#define ActRcvThrForDegUsr (ActLstClk+ 65)
|
#define ActRcvThrForDegUsr (ActLstClk+ 66)
|
||||||
#define ActRcvThrForDegTch (ActLstClk+ 66)
|
#define ActRcvThrForDegTch (ActLstClk+ 67)
|
||||||
#define ActRcvThrForCtrUsr (ActLstClk+ 67)
|
#define ActRcvThrForCtrUsr (ActLstClk+ 68)
|
||||||
#define ActRcvThrForCtrTch (ActLstClk+ 68)
|
#define ActRcvThrForCtrTch (ActLstClk+ 69)
|
||||||
#define ActRcvThrForInsUsr (ActLstClk+ 69)
|
#define ActRcvThrForInsUsr (ActLstClk+ 70)
|
||||||
#define ActRcvThrForInsTch (ActLstClk+ 70)
|
#define ActRcvThrForInsTch (ActLstClk+ 71)
|
||||||
#define ActRcvThrForGenUsr (ActLstClk+ 71)
|
#define ActRcvThrForGenUsr (ActLstClk+ 72)
|
||||||
#define ActRcvThrForGenTch (ActLstClk+ 72)
|
#define ActRcvThrForGenTch (ActLstClk+ 73)
|
||||||
#define ActRcvThrForSWAUsr (ActLstClk+ 73)
|
#define ActRcvThrForSWAUsr (ActLstClk+ 74)
|
||||||
#define ActRcvThrForSWATch (ActLstClk+ 74)
|
#define ActRcvThrForSWATch (ActLstClk+ 75)
|
||||||
#define ActRcvRepForCrsUsr (ActLstClk+ 75)
|
#define ActRcvRepForCrsUsr (ActLstClk+ 76)
|
||||||
#define ActRcvRepForCrsTch (ActLstClk+ 76)
|
#define ActRcvRepForCrsTch (ActLstClk+ 77)
|
||||||
#define ActRcvRepForDegUsr (ActLstClk+ 77)
|
#define ActRcvRepForDegUsr (ActLstClk+ 78)
|
||||||
#define ActRcvRepForDegTch (ActLstClk+ 78)
|
#define ActRcvRepForDegTch (ActLstClk+ 79)
|
||||||
#define ActRcvRepForCtrUsr (ActLstClk+ 79)
|
#define ActRcvRepForCtrUsr (ActLstClk+ 80)
|
||||||
#define ActRcvRepForCtrTch (ActLstClk+ 80)
|
#define ActRcvRepForCtrTch (ActLstClk+ 81)
|
||||||
#define ActRcvRepForInsUsr (ActLstClk+ 81)
|
#define ActRcvRepForInsUsr (ActLstClk+ 82)
|
||||||
#define ActRcvRepForInsTch (ActLstClk+ 82)
|
#define ActRcvRepForInsTch (ActLstClk+ 83)
|
||||||
#define ActRcvRepForGenUsr (ActLstClk+ 83)
|
#define ActRcvRepForGenUsr (ActLstClk+ 84)
|
||||||
#define ActRcvRepForGenTch (ActLstClk+ 84)
|
#define ActRcvRepForGenTch (ActLstClk+ 85)
|
||||||
#define ActRcvRepForSWAUsr (ActLstClk+ 85)
|
#define ActRcvRepForSWAUsr (ActLstClk+ 86)
|
||||||
#define ActRcvRepForSWATch (ActLstClk+ 86)
|
#define ActRcvRepForSWATch (ActLstClk+ 87)
|
||||||
#define ActReqDelThrCrsUsr (ActLstClk+ 87)
|
#define ActReqDelThrCrsUsr (ActLstClk+ 88)
|
||||||
#define ActReqDelThrCrsTch (ActLstClk+ 88)
|
#define ActReqDelThrCrsTch (ActLstClk+ 89)
|
||||||
#define ActReqDelThrDegUsr (ActLstClk+ 89)
|
#define ActReqDelThrDegUsr (ActLstClk+ 90)
|
||||||
#define ActReqDelThrDegTch (ActLstClk+ 90)
|
#define ActReqDelThrDegTch (ActLstClk+ 91)
|
||||||
#define ActReqDelThrCtrUsr (ActLstClk+ 91)
|
#define ActReqDelThrCtrUsr (ActLstClk+ 92)
|
||||||
#define ActReqDelThrCtrTch (ActLstClk+ 92)
|
#define ActReqDelThrCtrTch (ActLstClk+ 93)
|
||||||
#define ActReqDelThrInsUsr (ActLstClk+ 93)
|
#define ActReqDelThrInsUsr (ActLstClk+ 94)
|
||||||
#define ActReqDelThrInsTch (ActLstClk+ 94)
|
#define ActReqDelThrInsTch (ActLstClk+ 95)
|
||||||
#define ActReqDelThrGenUsr (ActLstClk+ 95)
|
#define ActReqDelThrGenUsr (ActLstClk+ 96)
|
||||||
#define ActReqDelThrGenTch (ActLstClk+ 96)
|
#define ActReqDelThrGenTch (ActLstClk+ 97)
|
||||||
#define ActReqDelThrSWAUsr (ActLstClk+ 97)
|
#define ActReqDelThrSWAUsr (ActLstClk+ 98)
|
||||||
#define ActReqDelThrSWATch (ActLstClk+ 98)
|
#define ActReqDelThrSWATch (ActLstClk+ 99)
|
||||||
#define ActDelThrForCrsUsr (ActLstClk+ 99)
|
#define ActDelThrForCrsUsr (ActLstClk+100)
|
||||||
#define ActDelThrForCrsTch (ActLstClk+100)
|
#define ActDelThrForCrsTch (ActLstClk+101)
|
||||||
#define ActDelThrForDegUsr (ActLstClk+101)
|
#define ActDelThrForDegUsr (ActLstClk+102)
|
||||||
#define ActDelThrForDegTch (ActLstClk+102)
|
#define ActDelThrForDegTch (ActLstClk+103)
|
||||||
#define ActDelThrForCtrUsr (ActLstClk+103)
|
#define ActDelThrForCtrUsr (ActLstClk+104)
|
||||||
#define ActDelThrForCtrTch (ActLstClk+104)
|
#define ActDelThrForCtrTch (ActLstClk+105)
|
||||||
#define ActDelThrForInsUsr (ActLstClk+105)
|
#define ActDelThrForInsUsr (ActLstClk+106)
|
||||||
#define ActDelThrForInsTch (ActLstClk+106)
|
#define ActDelThrForInsTch (ActLstClk+107)
|
||||||
#define ActDelThrForGenUsr (ActLstClk+107)
|
#define ActDelThrForGenUsr (ActLstClk+108)
|
||||||
#define ActDelThrForGenTch (ActLstClk+108)
|
#define ActDelThrForGenTch (ActLstClk+109)
|
||||||
#define ActDelThrForSWAUsr (ActLstClk+109)
|
#define ActDelThrForSWAUsr (ActLstClk+110)
|
||||||
#define ActDelThrForSWATch (ActLstClk+110)
|
#define ActDelThrForSWATch (ActLstClk+111)
|
||||||
#define ActCutThrForCrsUsr (ActLstClk+111)
|
#define ActCutThrForCrsUsr (ActLstClk+112)
|
||||||
#define ActCutThrForCrsTch (ActLstClk+112)
|
#define ActCutThrForCrsTch (ActLstClk+113)
|
||||||
#define ActCutThrForDegUsr (ActLstClk+113)
|
#define ActCutThrForDegUsr (ActLstClk+114)
|
||||||
#define ActCutThrForDegTch (ActLstClk+114)
|
#define ActCutThrForDegTch (ActLstClk+115)
|
||||||
#define ActCutThrForCtrUsr (ActLstClk+115)
|
#define ActCutThrForCtrUsr (ActLstClk+116)
|
||||||
#define ActCutThrForCtrTch (ActLstClk+116)
|
#define ActCutThrForCtrTch (ActLstClk+117)
|
||||||
#define ActCutThrForInsUsr (ActLstClk+117)
|
#define ActCutThrForInsUsr (ActLstClk+118)
|
||||||
#define ActCutThrForInsTch (ActLstClk+118)
|
#define ActCutThrForInsTch (ActLstClk+119)
|
||||||
#define ActCutThrForGenUsr (ActLstClk+119)
|
#define ActCutThrForGenUsr (ActLstClk+120)
|
||||||
#define ActCutThrForGenTch (ActLstClk+120)
|
#define ActCutThrForGenTch (ActLstClk+121)
|
||||||
#define ActCutThrForSWAUsr (ActLstClk+121)
|
#define ActCutThrForSWAUsr (ActLstClk+122)
|
||||||
#define ActCutThrForSWATch (ActLstClk+122)
|
#define ActCutThrForSWATch (ActLstClk+123)
|
||||||
#define ActPasThrForCrsUsr (ActLstClk+123)
|
#define ActPasThrForCrsUsr (ActLstClk+124)
|
||||||
#define ActPasThrForCrsTch (ActLstClk+124)
|
#define ActPasThrForCrsTch (ActLstClk+125)
|
||||||
#define ActPasThrForDegUsr (ActLstClk+125)
|
#define ActPasThrForDegUsr (ActLstClk+126)
|
||||||
#define ActPasThrForDegTch (ActLstClk+126)
|
#define ActPasThrForDegTch (ActLstClk+127)
|
||||||
#define ActPasThrForCtrUsr (ActLstClk+127)
|
#define ActPasThrForCtrUsr (ActLstClk+128)
|
||||||
#define ActPasThrForCtrTch (ActLstClk+128)
|
#define ActPasThrForCtrTch (ActLstClk+129)
|
||||||
#define ActPasThrForInsUsr (ActLstClk+129)
|
#define ActPasThrForInsUsr (ActLstClk+130)
|
||||||
#define ActPasThrForInsTch (ActLstClk+130)
|
#define ActPasThrForInsTch (ActLstClk+131)
|
||||||
#define ActPasThrForGenUsr (ActLstClk+131)
|
#define ActPasThrForGenUsr (ActLstClk+132)
|
||||||
#define ActPasThrForGenTch (ActLstClk+132)
|
#define ActPasThrForGenTch (ActLstClk+133)
|
||||||
#define ActPasThrForSWAUsr (ActLstClk+133)
|
#define ActPasThrForSWAUsr (ActLstClk+134)
|
||||||
#define ActPasThrForSWATch (ActLstClk+134)
|
#define ActPasThrForSWATch (ActLstClk+135)
|
||||||
#define ActDelPstForCrsUsr (ActLstClk+135)
|
#define ActDelPstForCrsUsr (ActLstClk+136)
|
||||||
#define ActDelPstForCrsTch (ActLstClk+136)
|
#define ActDelPstForCrsTch (ActLstClk+137)
|
||||||
#define ActDelPstForDegUsr (ActLstClk+137)
|
#define ActDelPstForDegUsr (ActLstClk+138)
|
||||||
#define ActDelPstForDegTch (ActLstClk+138)
|
#define ActDelPstForDegTch (ActLstClk+139)
|
||||||
#define ActDelPstForCtrUsr (ActLstClk+139)
|
#define ActDelPstForCtrUsr (ActLstClk+140)
|
||||||
#define ActDelPstForCtrTch (ActLstClk+140)
|
#define ActDelPstForCtrTch (ActLstClk+141)
|
||||||
#define ActDelPstForInsUsr (ActLstClk+141)
|
#define ActDelPstForInsUsr (ActLstClk+142)
|
||||||
#define ActDelPstForInsTch (ActLstClk+142)
|
#define ActDelPstForInsTch (ActLstClk+143)
|
||||||
#define ActDelPstForGenUsr (ActLstClk+143)
|
#define ActDelPstForGenUsr (ActLstClk+144)
|
||||||
#define ActDelPstForGenTch (ActLstClk+144)
|
#define ActDelPstForGenTch (ActLstClk+145)
|
||||||
#define ActDelPstForSWAUsr (ActLstClk+145)
|
#define ActDelPstForSWAUsr (ActLstClk+146)
|
||||||
#define ActDelPstForSWATch (ActLstClk+146)
|
#define ActDelPstForSWATch (ActLstClk+147)
|
||||||
#define ActEnbPstForCrsUsr (ActLstClk+147)
|
#define ActEnbPstForCrsUsr (ActLstClk+148)
|
||||||
#define ActEnbPstForCrsTch (ActLstClk+148)
|
#define ActEnbPstForCrsTch (ActLstClk+149)
|
||||||
#define ActEnbPstForDegUsr (ActLstClk+149)
|
#define ActEnbPstForDegUsr (ActLstClk+150)
|
||||||
#define ActEnbPstForDegTch (ActLstClk+150)
|
#define ActEnbPstForDegTch (ActLstClk+151)
|
||||||
#define ActEnbPstForCtrUsr (ActLstClk+151)
|
#define ActEnbPstForCtrUsr (ActLstClk+152)
|
||||||
#define ActEnbPstForCtrTch (ActLstClk+152)
|
#define ActEnbPstForCtrTch (ActLstClk+153)
|
||||||
#define ActEnbPstForInsUsr (ActLstClk+153)
|
#define ActEnbPstForInsUsr (ActLstClk+154)
|
||||||
#define ActEnbPstForInsTch (ActLstClk+154)
|
#define ActEnbPstForInsTch (ActLstClk+155)
|
||||||
#define ActEnbPstForGenUsr (ActLstClk+155)
|
#define ActEnbPstForGenUsr (ActLstClk+156)
|
||||||
#define ActEnbPstForGenTch (ActLstClk+156)
|
#define ActEnbPstForGenTch (ActLstClk+157)
|
||||||
#define ActEnbPstForSWAUsr (ActLstClk+157)
|
#define ActEnbPstForSWAUsr (ActLstClk+158)
|
||||||
#define ActEnbPstForSWATch (ActLstClk+158)
|
#define ActEnbPstForSWATch (ActLstClk+159)
|
||||||
#define ActDisPstForCrsUsr (ActLstClk+159)
|
#define ActDisPstForCrsUsr (ActLstClk+160)
|
||||||
#define ActDisPstForCrsTch (ActLstClk+160)
|
#define ActDisPstForCrsTch (ActLstClk+161)
|
||||||
#define ActDisPstForDegUsr (ActLstClk+161)
|
#define ActDisPstForDegUsr (ActLstClk+162)
|
||||||
#define ActDisPstForDegTch (ActLstClk+162)
|
#define ActDisPstForDegTch (ActLstClk+163)
|
||||||
#define ActDisPstForCtrUsr (ActLstClk+163)
|
#define ActDisPstForCtrUsr (ActLstClk+164)
|
||||||
#define ActDisPstForCtrTch (ActLstClk+164)
|
#define ActDisPstForCtrTch (ActLstClk+165)
|
||||||
#define ActDisPstForInsUsr (ActLstClk+165)
|
#define ActDisPstForInsUsr (ActLstClk+166)
|
||||||
#define ActDisPstForInsTch (ActLstClk+166)
|
#define ActDisPstForInsTch (ActLstClk+167)
|
||||||
#define ActDisPstForGenUsr (ActLstClk+167)
|
#define ActDisPstForGenUsr (ActLstClk+168)
|
||||||
#define ActDisPstForGenTch (ActLstClk+168)
|
#define ActDisPstForGenTch (ActLstClk+169)
|
||||||
#define ActDisPstForSWAUsr (ActLstClk+169)
|
#define ActDisPstForSWAUsr (ActLstClk+170)
|
||||||
#define ActDisPstForSWATch (ActLstClk+170)
|
#define ActDisPstForSWATch (ActLstClk+171)
|
||||||
|
|
||||||
#define ActCht (ActLstClk+171)
|
#define ActCht (ActLstClk+172)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************* Messages tab ********************************/
|
/******************************* Messages tab ********************************/
|
||||||
|
|
|
@ -118,33 +118,24 @@
|
||||||
// TODO: Width of column for data in notifications is too short
|
// TODO: Width of column for data in notifications is too short
|
||||||
|
|
||||||
// TODO: Recommendations about users to follow
|
// TODO: Recommendations about users to follow
|
||||||
/* The query can be something like this:
|
|
||||||
|
|
||||||
SELECT DISTINCT usr_follow.FollowedCod,usr_data.Surname1,usr_data.Surname2,usr_data.FirstName,usr_nicknames.Nickname
|
|
||||||
FROM usr_follow,usr_data,usr_nicknames
|
|
||||||
WHERE usr_follow.FollowerCod IN (SELECT FollowedCod FROM usr_follow WHERE FollowerCod='1346')
|
|
||||||
AND usr_follow.FollowedCod NOT IN (SELECT FollowedCod FROM usr_follow WHERE FollowerCod='1346')
|
|
||||||
AND usr_follow.FollowedCod<>'1346'
|
|
||||||
AND usr_follow.FollowedCod=usr_data.UsrCod
|
|
||||||
AND (usr_data.ProfileVisibility IN ('system','world')
|
|
||||||
OR (usr_data.ProfileVisibility='course'
|
|
||||||
AND usr_data.UsrCod IN
|
|
||||||
(SELECT UsrCod FROM crs_usr WHERE CrsCod IN
|
|
||||||
(SELECT CrsCod FROM crs_usr WHERE UsrCod='1346'))))
|
|
||||||
AND usr_follow.FollowedCod=usr_nicknames.UsrCod ORDER BY RAND() LIMIT 3;
|
|
||||||
|
|
||||||
*/
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.131.4 (2016-01-27)"
|
#define Log_PLATFORM_VERSION "SWAD 15.132 (2016-01-27)"
|
||||||
#define CSS_FILE "swad15.131.2.css"
|
#define CSS_FILE "swad15.131.2.css"
|
||||||
#define JS_FILE "swad15.131.3.js"
|
#define JS_FILE "swad15.131.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
Version 15.132: Jan 27, 2016 Put link to suggest users to follow. (195116 lines)
|
||||||
|
2 changes necessary in database:
|
||||||
|
CREATE INDEX PhotoVisibility ON usr_data (PhotoVisibility);
|
||||||
|
CREATE INDEX ProfileVisibility ON usr_data (ProfileVisibility);
|
||||||
|
|
||||||
Version 15.131.4: Jan 27, 2016 Fixed bug in ranking of followed. (195030 lines)
|
Version 15.131.4: Jan 27, 2016 Fixed bug in ranking of followed. (195030 lines)
|
||||||
Version 15.131.3: Jan 27, 2016 Animated link to view old timeline. (195015 lines)
|
Version 15.131.3: Jan 27, 2016 Animated link to view old timeline. (195015 lines)
|
||||||
Version 15.131.2: Jan 26, 2016 Change in default color of links. (194998 lines)
|
Version 15.131.2: Jan 26, 2016 Change in default color of links. (194998 lines)
|
||||||
|
|
|
@ -2520,13 +2520,14 @@ mysql> DESCRIBE usr_data;
|
||||||
| Surname2 | varchar(32) | NO | | NULL | |
|
| Surname2 | varchar(32) | NO | | NULL | |
|
||||||
| FirstName | varchar(32) | NO | | NULL | |
|
| FirstName | varchar(32) | NO | | NULL | |
|
||||||
| Sex | enum('unknown','female','male') | NO | | unknown | |
|
| Sex | enum('unknown','female','male') | NO | | unknown | |
|
||||||
|
| Layout | tinyint(4) | NO | MUL | 0 | |
|
||||||
| Theme | char(16) | NO | MUL | NULL | |
|
| Theme | char(16) | NO | MUL | NULL | |
|
||||||
| IconSet | char(16) | NO | MUL | NULL | |
|
| IconSet | char(16) | NO | MUL | NULL | |
|
||||||
| Language | char(2) | NO | MUL | NULL | |
|
| Language | char(2) | NO | MUL | NULL | |
|
||||||
| FirstDayOfWeek | tinyint(4) | NO | MUL | 0 | |
|
| FirstDayOfWeek | tinyint(4) | NO | MUL | 0 | |
|
||||||
| Photo | char(43) | NO | | NULL | |
|
| Photo | char(43) | NO | | NULL | |
|
||||||
| PhotoVisibility | enum('unknown','user','course','system','world') | NO | | unknown | |
|
| PhotoVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||||
| ProfileVisibility | enum('unknown','user','course','system','world') | NO | | unknown | |
|
| ProfileVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||||
| CtyCod | int(11) | NO | MUL | -1 | |
|
| CtyCod | int(11) | NO | MUL | -1 | |
|
||||||
| InsCtyCod | int(11) | NO | MUL | -1 | |
|
| InsCtyCod | int(11) | NO | MUL | -1 | |
|
||||||
| InsCod | int(11) | NO | MUL | -1 | |
|
| InsCod | int(11) | NO | MUL | -1 | |
|
||||||
|
@ -2543,10 +2544,10 @@ mysql> DESCRIBE usr_data;
|
||||||
| Comments | text | NO | | NULL | |
|
| Comments | text | NO | | NULL | |
|
||||||
| Menu | tinyint(4) | NO | MUL | 0 | |
|
| Menu | tinyint(4) | NO | MUL | 0 | |
|
||||||
| SideCols | tinyint(4) | NO | MUL | 3 | |
|
| SideCols | tinyint(4) | NO | MUL | 3 | |
|
||||||
| NotifNtfEvents | int(11) | NO | | 0 | |
|
| NotifNtfEvents | int(11) | NO | | -1 | |
|
||||||
| EmailNtfEvents | int(11) | NO | | 0 | |
|
| EmailNtfEvents | int(11) | NO | | 0 | |
|
||||||
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
||||||
32 rows in set (0.00 sec)
|
33 rows in set (0.01 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_data ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_data ("
|
||||||
"UsrCod INT NOT NULL AUTO_INCREMENT,"
|
"UsrCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
|
@ -2587,6 +2588,8 @@ mysql> DESCRIBE usr_data;
|
||||||
"INDEX(IconSet),"
|
"INDEX(IconSet),"
|
||||||
"INDEX(Language),"
|
"INDEX(Language),"
|
||||||
"INDEX(FirstDayOfWeek),"
|
"INDEX(FirstDayOfWeek),"
|
||||||
|
"INDEX(PhotoVisibility),"
|
||||||
|
"INDEX(ProfileVisibility),"
|
||||||
"INDEX(CtyCod),"
|
"INDEX(CtyCod),"
|
||||||
"INDEX(InsCtyCod),"
|
"INDEX(InsCtyCod),"
|
||||||
"INDEX(InsCod),"
|
"INDEX(InsCod),"
|
||||||
|
|
|
@ -70,6 +70,77 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
||||||
const char *Title);
|
const char *Title);
|
||||||
static void Fol_ShowFollowedOrFollower (const struct UsrData *UsrDat);
|
static void Fol_ShowFollowedOrFollower (const struct UsrData *UsrDat);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Put link to suggest users to follow ********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Fol_PutLinkWhoToFollow (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Who_to_follow;
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
|
Lay_PutContextualLink (ActWhoFol,NULL,
|
||||||
|
"follow64x64.png",
|
||||||
|
Txt_Who_to_follow,Txt_Who_to_follow);
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Put link to suggest users to follow ********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Fol_SuggestWhoToFollow (void)
|
||||||
|
{
|
||||||
|
/* The query can be something like this:
|
||||||
|
|
||||||
|
SELECT UsrCod FROM
|
||||||
|
(
|
||||||
|
|
||||||
|
SELECT DISTINCT usr_follow.FollowedCod AS UsrCod
|
||||||
|
FROM usr_follow,
|
||||||
|
(SELECT FollowedCod FROM usr_follow
|
||||||
|
WHERE FollowerCod='1346') AS my_followed,
|
||||||
|
usr_data
|
||||||
|
WHERE usr_follow.FollowerCod=my_followed.FollowedCod
|
||||||
|
AND usr_follow.FollowedCod<>'1346'
|
||||||
|
AND usr_follow.FollowedCod=usr_data.UsrCod
|
||||||
|
AND usr_data.ProfileVisibility IN ('system','world')
|
||||||
|
|
||||||
|
UNION
|
||||||
|
|
||||||
|
SELECT DISTINCT crs_usr.UsrCod
|
||||||
|
FROM crs_usr,
|
||||||
|
(SELECT CrsCod FROM crs_usr
|
||||||
|
WHERE UsrCod='1346') AS my_crs,
|
||||||
|
usr_data
|
||||||
|
WHERE crs_usr.CrsCod=my_crs.CrsCod
|
||||||
|
AND crs_usr.UsrCod<>'1346'
|
||||||
|
AND crs_usr.UsrCod=usr_data.UsrCod
|
||||||
|
AND usr_data.ProfileVisibility='course'
|
||||||
|
|
||||||
|
UNION
|
||||||
|
|
||||||
|
SELECT DISTINCT crs_usr.UsrCod
|
||||||
|
FROM crs_usr,
|
||||||
|
(SELECT CrsCod,Role FROM crs_usr WHERE
|
||||||
|
UsrCod='1346') AS my_crs_role,
|
||||||
|
usr_data
|
||||||
|
WHERE crs_usr.CrsCod=my_crs_role.CrsCod
|
||||||
|
AND crs_usr.Role<>my_crs_role.Role
|
||||||
|
AND crs_usr.UsrCod=usr_data.UsrCod
|
||||||
|
AND usr_data.ProfileVisibility='user'
|
||||||
|
|
||||||
|
) AS UsrsToFollow
|
||||||
|
|
||||||
|
WHERE UsrCod NOT IN
|
||||||
|
(SELECT FollowedCod FROM usr_follow
|
||||||
|
WHERE FollowerCod='1346')
|
||||||
|
|
||||||
|
ORDER BY RAND() LIMIT 3;
|
||||||
|
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Check if a user is a follower of another user ***************/
|
/*************** Check if a user is a follower of another user ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -43,6 +43,9 @@
|
||||||
/****************************** Public prototypes ****************************/
|
/****************************** Public prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Fol_PutLinkWhoToFollow (void);
|
||||||
|
void Fol_SuggestWhoToFollow (void);
|
||||||
|
|
||||||
bool Fol_CheckUsrIsFollowerOf (long FollowerCod,long FollowedCod);
|
bool Fol_CheckUsrIsFollowerOf (long FollowerCod,long FollowedCod);
|
||||||
unsigned Fol_GetNumFollowing (long UsrCod);
|
unsigned Fol_GetNumFollowing (long UsrCod);
|
||||||
unsigned Fol_GetNumFollowers (long UsrCod);
|
unsigned Fol_GetNumFollowers (long UsrCod);
|
||||||
|
|
|
@ -127,6 +127,9 @@ char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba)
|
||||||
|
|
||||||
void Prf_RequestUserProfile (void)
|
void Prf_RequestUserProfile (void)
|
||||||
{
|
{
|
||||||
|
/***** Put links to suggests users to follow *****/
|
||||||
|
Fol_PutLinkWhoToFollow ();
|
||||||
|
|
||||||
/* By default, the nickname is filled with my nickname
|
/* By default, the nickname is filled with my nickname
|
||||||
If no user logged ==> the nickname is empty */
|
If no user logged ==> the nickname is empty */
|
||||||
Prf_RequestUserProfileWithDefaultNickname (Gbl.Usrs.Me.UsrDat.Nickname);
|
Prf_RequestUserProfileWithDefaultNickname (Gbl.Usrs.Me.UsrDat.Nickname);
|
||||||
|
@ -189,6 +192,9 @@ void Prf_GetUsrDatAndShowUserProfile (void)
|
||||||
|
|
||||||
if (Error)
|
if (Error)
|
||||||
{
|
{
|
||||||
|
/***** Put links to suggests users to follow *****/
|
||||||
|
Fol_PutLinkWhoToFollow ();
|
||||||
|
|
||||||
/* Show error message */
|
/* Show error message */
|
||||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||||
|
|
||||||
|
|
|
@ -332,9 +332,15 @@ static void Soc_ShowTimelineGblHighlightingNot (long NotCod)
|
||||||
extern const char *Txt_You_dont_follow_any_user;
|
extern const char *Txt_You_dont_follow_any_user;
|
||||||
char Query[1024];
|
char Query[1024];
|
||||||
|
|
||||||
/***** Show warning if I do not follow anyone *****/
|
/***** Check if I follow someone *****/
|
||||||
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
||||||
Lay_ShowAlert (Lay_INFO,Txt_You_dont_follow_any_user);
|
{
|
||||||
|
/***** Put links to suggests users to follow *****/
|
||||||
|
Fol_PutLinkWhoToFollow ();
|
||||||
|
|
||||||
|
/***** Show warning if I do not follow anyone *****/
|
||||||
|
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_follow_any_user);
|
||||||
|
}
|
||||||
|
|
||||||
/***** Build query to get timeline *****/
|
/***** Build query to get timeline *****/
|
||||||
Soc_BuildQueryToGetTimeline (Soc_TIMELINE_GBL,
|
Soc_BuildQueryToGetTimeline (Soc_TIMELINE_GBL,
|
||||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -49201,6 +49201,27 @@ const char *Txt_What_would_you_like_to_do =
|
||||||
"O que você faria?";
|
"O que você faria?";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Who_to_follow =
|
||||||
|
#if L==1
|
||||||
|
"A qui seguir";
|
||||||
|
#elif L==2
|
||||||
|
"Wer zu folgen";
|
||||||
|
#elif L==3
|
||||||
|
"Who to follow";
|
||||||
|
#elif L==4
|
||||||
|
"A quién seguir";
|
||||||
|
#elif L==5
|
||||||
|
"Qui à suivre";
|
||||||
|
#elif L==6
|
||||||
|
"A quién seguir"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Chi da seguire";
|
||||||
|
#elif L==8
|
||||||
|
"Kto do naśladowania";
|
||||||
|
#elif L==9
|
||||||
|
"Quem seguir";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_With_centres =
|
const char *Txt_With_centres =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Amb centres";
|
"Amb centres";
|
||||||
|
|
|
@ -858,7 +858,7 @@ bool Usr_CheckIfUsrSharesAnyOfMyCrsWithDifferentRole (long UsrCod)
|
||||||
"(SELECT CrsCod,Role FROM crs_usr WHERE UsrCod='%ld') AS my_courses,"
|
"(SELECT CrsCod,Role FROM crs_usr WHERE UsrCod='%ld') AS my_courses,"
|
||||||
"(SELECT CrsCod,Role FROM crs_usr WHERE UsrCod='%ld') AS usr_courses"
|
"(SELECT CrsCod,Role FROM crs_usr WHERE UsrCod='%ld') AS usr_courses"
|
||||||
" WHERE my_courses.CrsCod=usr_courses.CrsCod"
|
" WHERE my_courses.CrsCod=usr_courses.CrsCod"
|
||||||
" AND my_courses.Role!=usr_courses.Role",
|
" AND my_courses.Role<>usr_courses.Role",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod,UsrCod);
|
||||||
return (DB_QueryCOUNT (Query,"can not check if a user shares any course with you") != 0);
|
return (DB_QueryCOUNT (Query,"can not check if a user shares any course with you") != 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue