diff --git a/swad_action.c b/swad_action.c
index 7dab7091..853402fe 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -2621,7 +2621,6 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActReqRemSocComGbl*/{1506,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Soc_RequestRemSocialComUsr ,NULL},
/* ActRemSocComGbl */{1508,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Soc_RemoveSocialComUsr ,NULL},
- /* ActSeeMyPubPrf */{1637,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_ShowMyProfile ,NULL},
/* ActSeeOthPubPrf */{1402,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_GetUsrDatAndShowUserProfile,NULL},
/* ActCal1stClkTim */{1405,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_CalculateFigures ,NULL},
/* ActCalNumClk */{1406,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_CalculateFigures ,NULL},
@@ -4623,7 +4622,6 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActSeeCalDeg, // #1634
ActPrnCalDeg, // #1635
ActChgCalDeg1stDay, // #1636
- ActSeeMyPubPrf, // #1637
};
/*****************************************************************************/
diff --git a/swad_action.h b/swad_action.h
index d168e251..fb52283b 100644
--- a/swad_action.h
+++ b/swad_action.h
@@ -55,9 +55,9 @@ typedef enum
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
-#define Act_NUM_ACTIONS (1 + 9 + 54 + 17 + 47 + 27 + 24 + 115 + 54 + 416 + 159 + 173 + 36 + 31 + 97)
+#define Act_NUM_ACTIONS (1 + 9 + 54 + 17 + 47 + 27 + 24 + 115 + 54 + 416 + 159 + 172 + 36 + 31 + 97)
-#define Act_MAX_ACTION_COD 1637
+#define Act_MAX_ACTION_COD 1636
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 12
@@ -1165,153 +1165,152 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActReqRemSocComUsr (ActLstClk + 28)
#define ActRemSocComUsr (ActLstClk + 29)
-#define ActSeeMyPubPrf (ActLstClk + 30)
-#define ActSeeOthPubPrf (ActLstClk + 31)
-#define ActCal1stClkTim (ActLstClk + 32)
-#define ActCalNumClk (ActLstClk + 33)
-#define ActCalNumFilVie (ActLstClk + 34)
-#define ActCalNumForPst (ActLstClk + 35)
-#define ActCalNumMsgSnt (ActLstClk + 36)
+#define ActSeeOthPubPrf (ActLstClk + 30)
+#define ActCal1stClkTim (ActLstClk + 31)
+#define ActCalNumClk (ActLstClk + 32)
+#define ActCalNumFilVie (ActLstClk + 33)
+#define ActCalNumForPst (ActLstClk + 34)
+#define ActCalNumMsgSnt (ActLstClk + 35)
-#define ActFolUsr (ActLstClk + 37)
-#define ActUnfUsr (ActLstClk + 38)
-#define ActSeeFlg (ActLstClk + 39)
-#define ActSeeFlr (ActLstClk + 40)
+#define ActFolUsr (ActLstClk + 36)
+#define ActUnfUsr (ActLstClk + 37)
+#define ActSeeFlg (ActLstClk + 38)
+#define ActSeeFlr (ActLstClk + 39)
-#define ActSeeForCrsUsr (ActLstClk + 41)
-#define ActSeeForCrsTch (ActLstClk + 42)
-#define ActSeeForDegUsr (ActLstClk + 43)
-#define ActSeeForDegTch (ActLstClk + 44)
-#define ActSeeForCtrUsr (ActLstClk + 45)
-#define ActSeeForCtrTch (ActLstClk + 46)
-#define ActSeeForInsUsr (ActLstClk + 47)
-#define ActSeeForInsTch (ActLstClk + 48)
-#define ActSeeForGenUsr (ActLstClk + 49)
-#define ActSeeForGenTch (ActLstClk + 50)
-#define ActSeeForSWAUsr (ActLstClk + 51)
-#define ActSeeForSWATch (ActLstClk + 52)
-#define ActSeePstForCrsUsr (ActLstClk + 53)
-#define ActSeePstForCrsTch (ActLstClk + 54)
-#define ActSeePstForDegUsr (ActLstClk + 55)
-#define ActSeePstForDegTch (ActLstClk + 56)
-#define ActSeePstForCtrUsr (ActLstClk + 57)
-#define ActSeePstForCtrTch (ActLstClk + 58)
-#define ActSeePstForInsUsr (ActLstClk + 59)
-#define ActSeePstForInsTch (ActLstClk + 60)
-#define ActSeePstForGenUsr (ActLstClk + 61)
-#define ActSeePstForGenTch (ActLstClk + 62)
-#define ActSeePstForSWAUsr (ActLstClk + 63)
-#define ActSeePstForSWATch (ActLstClk + 64)
-#define ActRcvThrForCrsUsr (ActLstClk + 65)
-#define ActRcvThrForCrsTch (ActLstClk + 66)
-#define ActRcvThrForDegUsr (ActLstClk + 67)
-#define ActRcvThrForDegTch (ActLstClk + 68)
-#define ActRcvThrForCtrUsr (ActLstClk + 69)
-#define ActRcvThrForCtrTch (ActLstClk + 70)
-#define ActRcvThrForInsUsr (ActLstClk + 71)
-#define ActRcvThrForInsTch (ActLstClk + 72)
-#define ActRcvThrForGenUsr (ActLstClk + 73)
-#define ActRcvThrForGenTch (ActLstClk + 74)
-#define ActRcvThrForSWAUsr (ActLstClk + 75)
-#define ActRcvThrForSWATch (ActLstClk + 76)
-#define ActRcvRepForCrsUsr (ActLstClk + 77)
-#define ActRcvRepForCrsTch (ActLstClk + 78)
-#define ActRcvRepForDegUsr (ActLstClk + 79)
-#define ActRcvRepForDegTch (ActLstClk + 80)
-#define ActRcvRepForCtrUsr (ActLstClk + 81)
-#define ActRcvRepForCtrTch (ActLstClk + 82)
-#define ActRcvRepForInsUsr (ActLstClk + 83)
-#define ActRcvRepForInsTch (ActLstClk + 84)
-#define ActRcvRepForGenUsr (ActLstClk + 85)
-#define ActRcvRepForGenTch (ActLstClk + 86)
-#define ActRcvRepForSWAUsr (ActLstClk + 87)
-#define ActRcvRepForSWATch (ActLstClk + 88)
-#define ActReqDelThrCrsUsr (ActLstClk + 89)
-#define ActReqDelThrCrsTch (ActLstClk + 90)
-#define ActReqDelThrDegUsr (ActLstClk + 91)
-#define ActReqDelThrDegTch (ActLstClk + 92)
-#define ActReqDelThrCtrUsr (ActLstClk + 93)
-#define ActReqDelThrCtrTch (ActLstClk + 94)
-#define ActReqDelThrInsUsr (ActLstClk + 95)
-#define ActReqDelThrInsTch (ActLstClk + 96)
-#define ActReqDelThrGenUsr (ActLstClk + 97)
-#define ActReqDelThrGenTch (ActLstClk + 98)
-#define ActReqDelThrSWAUsr (ActLstClk + 99)
-#define ActReqDelThrSWATch (ActLstClk + 100)
-#define ActDelThrForCrsUsr (ActLstClk + 101)
-#define ActDelThrForCrsTch (ActLstClk + 102)
-#define ActDelThrForDegUsr (ActLstClk + 103)
-#define ActDelThrForDegTch (ActLstClk + 104)
-#define ActDelThrForCtrUsr (ActLstClk + 105)
-#define ActDelThrForCtrTch (ActLstClk + 106)
-#define ActDelThrForInsUsr (ActLstClk + 107)
-#define ActDelThrForInsTch (ActLstClk + 108)
-#define ActDelThrForGenUsr (ActLstClk + 109)
-#define ActDelThrForGenTch (ActLstClk + 110)
-#define ActDelThrForSWAUsr (ActLstClk + 111)
-#define ActDelThrForSWATch (ActLstClk + 112)
-#define ActCutThrForCrsUsr (ActLstClk + 113)
-#define ActCutThrForCrsTch (ActLstClk + 114)
-#define ActCutThrForDegUsr (ActLstClk + 115)
-#define ActCutThrForDegTch (ActLstClk + 116)
-#define ActCutThrForCtrUsr (ActLstClk + 117)
-#define ActCutThrForCtrTch (ActLstClk + 118)
-#define ActCutThrForInsUsr (ActLstClk + 119)
-#define ActCutThrForInsTch (ActLstClk + 120)
-#define ActCutThrForGenUsr (ActLstClk + 121)
-#define ActCutThrForGenTch (ActLstClk + 122)
-#define ActCutThrForSWAUsr (ActLstClk + 123)
-#define ActCutThrForSWATch (ActLstClk + 124)
-#define ActPasThrForCrsUsr (ActLstClk + 125)
-#define ActPasThrForCrsTch (ActLstClk + 126)
-#define ActPasThrForDegUsr (ActLstClk + 127)
-#define ActPasThrForDegTch (ActLstClk + 128)
-#define ActPasThrForCtrUsr (ActLstClk + 129)
-#define ActPasThrForCtrTch (ActLstClk + 130)
-#define ActPasThrForInsUsr (ActLstClk + 131)
-#define ActPasThrForInsTch (ActLstClk + 132)
-#define ActPasThrForGenUsr (ActLstClk + 133)
-#define ActPasThrForGenTch (ActLstClk + 134)
-#define ActPasThrForSWAUsr (ActLstClk + 135)
-#define ActPasThrForSWATch (ActLstClk + 136)
-#define ActDelPstForCrsUsr (ActLstClk + 137)
-#define ActDelPstForCrsTch (ActLstClk + 138)
-#define ActDelPstForDegUsr (ActLstClk + 139)
-#define ActDelPstForDegTch (ActLstClk + 140)
-#define ActDelPstForCtrUsr (ActLstClk + 141)
-#define ActDelPstForCtrTch (ActLstClk + 142)
-#define ActDelPstForInsUsr (ActLstClk + 143)
-#define ActDelPstForInsTch (ActLstClk + 144)
-#define ActDelPstForGenUsr (ActLstClk + 145)
-#define ActDelPstForGenTch (ActLstClk + 146)
-#define ActDelPstForSWAUsr (ActLstClk + 147)
-#define ActDelPstForSWATch (ActLstClk + 148)
-#define ActEnbPstForCrsUsr (ActLstClk + 149)
-#define ActEnbPstForCrsTch (ActLstClk + 150)
-#define ActEnbPstForDegUsr (ActLstClk + 151)
-#define ActEnbPstForDegTch (ActLstClk + 152)
-#define ActEnbPstForCtrUsr (ActLstClk + 153)
-#define ActEnbPstForCtrTch (ActLstClk + 154)
-#define ActEnbPstForInsUsr (ActLstClk + 155)
-#define ActEnbPstForInsTch (ActLstClk + 156)
-#define ActEnbPstForGenUsr (ActLstClk + 157)
-#define ActEnbPstForGenTch (ActLstClk + 158)
-#define ActEnbPstForSWAUsr (ActLstClk + 159)
-#define ActEnbPstForSWATch (ActLstClk + 160)
-#define ActDisPstForCrsUsr (ActLstClk + 161)
-#define ActDisPstForCrsTch (ActLstClk + 162)
-#define ActDisPstForDegUsr (ActLstClk + 163)
-#define ActDisPstForDegTch (ActLstClk + 164)
-#define ActDisPstForCtrUsr (ActLstClk + 165)
-#define ActDisPstForCtrTch (ActLstClk + 166)
-#define ActDisPstForInsUsr (ActLstClk + 167)
-#define ActDisPstForInsTch (ActLstClk + 168)
-#define ActDisPstForGenUsr (ActLstClk + 169)
-#define ActDisPstForGenTch (ActLstClk + 170)
-#define ActDisPstForSWAUsr (ActLstClk + 171)
-#define ActDisPstForSWATch (ActLstClk + 172)
+#define ActSeeForCrsUsr (ActLstClk + 40)
+#define ActSeeForCrsTch (ActLstClk + 41)
+#define ActSeeForDegUsr (ActLstClk + 42)
+#define ActSeeForDegTch (ActLstClk + 43)
+#define ActSeeForCtrUsr (ActLstClk + 44)
+#define ActSeeForCtrTch (ActLstClk + 45)
+#define ActSeeForInsUsr (ActLstClk + 46)
+#define ActSeeForInsTch (ActLstClk + 47)
+#define ActSeeForGenUsr (ActLstClk + 48)
+#define ActSeeForGenTch (ActLstClk + 49)
+#define ActSeeForSWAUsr (ActLstClk + 50)
+#define ActSeeForSWATch (ActLstClk + 51)
+#define ActSeePstForCrsUsr (ActLstClk + 52)
+#define ActSeePstForCrsTch (ActLstClk + 53)
+#define ActSeePstForDegUsr (ActLstClk + 54)
+#define ActSeePstForDegTch (ActLstClk + 55)
+#define ActSeePstForCtrUsr (ActLstClk + 56)
+#define ActSeePstForCtrTch (ActLstClk + 57)
+#define ActSeePstForInsUsr (ActLstClk + 58)
+#define ActSeePstForInsTch (ActLstClk + 59)
+#define ActSeePstForGenUsr (ActLstClk + 60)
+#define ActSeePstForGenTch (ActLstClk + 61)
+#define ActSeePstForSWAUsr (ActLstClk + 62)
+#define ActSeePstForSWATch (ActLstClk + 63)
+#define ActRcvThrForCrsUsr (ActLstClk + 64)
+#define ActRcvThrForCrsTch (ActLstClk + 65)
+#define ActRcvThrForDegUsr (ActLstClk + 66)
+#define ActRcvThrForDegTch (ActLstClk + 67)
+#define ActRcvThrForCtrUsr (ActLstClk + 68)
+#define ActRcvThrForCtrTch (ActLstClk + 69)
+#define ActRcvThrForInsUsr (ActLstClk + 70)
+#define ActRcvThrForInsTch (ActLstClk + 71)
+#define ActRcvThrForGenUsr (ActLstClk + 72)
+#define ActRcvThrForGenTch (ActLstClk + 73)
+#define ActRcvThrForSWAUsr (ActLstClk + 74)
+#define ActRcvThrForSWATch (ActLstClk + 75)
+#define ActRcvRepForCrsUsr (ActLstClk + 76)
+#define ActRcvRepForCrsTch (ActLstClk + 77)
+#define ActRcvRepForDegUsr (ActLstClk + 78)
+#define ActRcvRepForDegTch (ActLstClk + 79)
+#define ActRcvRepForCtrUsr (ActLstClk + 80)
+#define ActRcvRepForCtrTch (ActLstClk + 81)
+#define ActRcvRepForInsUsr (ActLstClk + 82)
+#define ActRcvRepForInsTch (ActLstClk + 83)
+#define ActRcvRepForGenUsr (ActLstClk + 84)
+#define ActRcvRepForGenTch (ActLstClk + 85)
+#define ActRcvRepForSWAUsr (ActLstClk + 86)
+#define ActRcvRepForSWATch (ActLstClk + 87)
+#define ActReqDelThrCrsUsr (ActLstClk + 88)
+#define ActReqDelThrCrsTch (ActLstClk + 89)
+#define ActReqDelThrDegUsr (ActLstClk + 90)
+#define ActReqDelThrDegTch (ActLstClk + 91)
+#define ActReqDelThrCtrUsr (ActLstClk + 92)
+#define ActReqDelThrCtrTch (ActLstClk + 93)
+#define ActReqDelThrInsUsr (ActLstClk + 94)
+#define ActReqDelThrInsTch (ActLstClk + 95)
+#define ActReqDelThrGenUsr (ActLstClk + 96)
+#define ActReqDelThrGenTch (ActLstClk + 97)
+#define ActReqDelThrSWAUsr (ActLstClk + 98)
+#define ActReqDelThrSWATch (ActLstClk + 99)
+#define ActDelThrForCrsUsr (ActLstClk + 100)
+#define ActDelThrForCrsTch (ActLstClk + 101)
+#define ActDelThrForDegUsr (ActLstClk + 102)
+#define ActDelThrForDegTch (ActLstClk + 103)
+#define ActDelThrForCtrUsr (ActLstClk + 104)
+#define ActDelThrForCtrTch (ActLstClk + 105)
+#define ActDelThrForInsUsr (ActLstClk + 106)
+#define ActDelThrForInsTch (ActLstClk + 107)
+#define ActDelThrForGenUsr (ActLstClk + 108)
+#define ActDelThrForGenTch (ActLstClk + 109)
+#define ActDelThrForSWAUsr (ActLstClk + 110)
+#define ActDelThrForSWATch (ActLstClk + 111)
+#define ActCutThrForCrsUsr (ActLstClk + 112)
+#define ActCutThrForCrsTch (ActLstClk + 113)
+#define ActCutThrForDegUsr (ActLstClk + 114)
+#define ActCutThrForDegTch (ActLstClk + 115)
+#define ActCutThrForCtrUsr (ActLstClk + 116)
+#define ActCutThrForCtrTch (ActLstClk + 117)
+#define ActCutThrForInsUsr (ActLstClk + 118)
+#define ActCutThrForInsTch (ActLstClk + 119)
+#define ActCutThrForGenUsr (ActLstClk + 120)
+#define ActCutThrForGenTch (ActLstClk + 121)
+#define ActCutThrForSWAUsr (ActLstClk + 122)
+#define ActCutThrForSWATch (ActLstClk + 123)
+#define ActPasThrForCrsUsr (ActLstClk + 124)
+#define ActPasThrForCrsTch (ActLstClk + 125)
+#define ActPasThrForDegUsr (ActLstClk + 126)
+#define ActPasThrForDegTch (ActLstClk + 127)
+#define ActPasThrForCtrUsr (ActLstClk + 128)
+#define ActPasThrForCtrTch (ActLstClk + 129)
+#define ActPasThrForInsUsr (ActLstClk + 130)
+#define ActPasThrForInsTch (ActLstClk + 131)
+#define ActPasThrForGenUsr (ActLstClk + 132)
+#define ActPasThrForGenTch (ActLstClk + 133)
+#define ActPasThrForSWAUsr (ActLstClk + 134)
+#define ActPasThrForSWATch (ActLstClk + 135)
+#define ActDelPstForCrsUsr (ActLstClk + 136)
+#define ActDelPstForCrsTch (ActLstClk + 137)
+#define ActDelPstForDegUsr (ActLstClk + 138)
+#define ActDelPstForDegTch (ActLstClk + 139)
+#define ActDelPstForCtrUsr (ActLstClk + 140)
+#define ActDelPstForCtrTch (ActLstClk + 141)
+#define ActDelPstForInsUsr (ActLstClk + 142)
+#define ActDelPstForInsTch (ActLstClk + 143)
+#define ActDelPstForGenUsr (ActLstClk + 144)
+#define ActDelPstForGenTch (ActLstClk + 145)
+#define ActDelPstForSWAUsr (ActLstClk + 146)
+#define ActDelPstForSWATch (ActLstClk + 147)
+#define ActEnbPstForCrsUsr (ActLstClk + 148)
+#define ActEnbPstForCrsTch (ActLstClk + 149)
+#define ActEnbPstForDegUsr (ActLstClk + 150)
+#define ActEnbPstForDegTch (ActLstClk + 151)
+#define ActEnbPstForCtrUsr (ActLstClk + 152)
+#define ActEnbPstForCtrTch (ActLstClk + 153)
+#define ActEnbPstForInsUsr (ActLstClk + 154)
+#define ActEnbPstForInsTch (ActLstClk + 155)
+#define ActEnbPstForGenUsr (ActLstClk + 156)
+#define ActEnbPstForGenTch (ActLstClk + 157)
+#define ActEnbPstForSWAUsr (ActLstClk + 158)
+#define ActEnbPstForSWATch (ActLstClk + 159)
+#define ActDisPstForCrsUsr (ActLstClk + 160)
+#define ActDisPstForCrsTch (ActLstClk + 161)
+#define ActDisPstForDegUsr (ActLstClk + 162)
+#define ActDisPstForDegTch (ActLstClk + 163)
+#define ActDisPstForCtrUsr (ActLstClk + 164)
+#define ActDisPstForCtrTch (ActLstClk + 165)
+#define ActDisPstForInsUsr (ActLstClk + 166)
+#define ActDisPstForInsTch (ActLstClk + 167)
+#define ActDisPstForGenUsr (ActLstClk + 168)
+#define ActDisPstForGenTch (ActLstClk + 169)
+#define ActDisPstForSWAUsr (ActLstClk + 170)
+#define ActDisPstForSWATch (ActLstClk + 171)
-#define ActCht (ActLstClk + 173)
+#define ActCht (ActLstClk + 172)
/*****************************************************************************/
/******************************* Messages tab ********************************/
diff --git a/swad_changelog.h b/swad_changelog.h
index 358429fb..794b2015 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -199,13 +199,17 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.138 (2017-02-17)"
+#define Log_PLATFORM_VERSION "SWAD 16.139 (2017-02-17)"
#define CSS_FILE "swad16.136.css"
#define JS_FILE "swad16.123.js"
// 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
/*
+ Version 16.139: Feb 17, 2017 Fixed bugs showing my public profile. (? lines)
+ 1 change necessary in database:
+DELETE FROM actions WHERE ActCod='1637';
+
Version 16.138: Feb 17, 2017 On right column show only users to follow with visible photo. (212873 lines)
Version 16.137: Feb 17, 2017 Link to view my public profile. (212808 lines)
1 change necessary in database:
diff --git a/swad_parameter.c b/swad_parameter.c
index e10061ec..1ca81993 100644
--- a/swad_parameter.c
+++ b/swad_parameter.c
@@ -692,7 +692,10 @@ void Par_GetMainParameters (void)
// and to refresh old publishings in user's timeline
// If user does not exist ==> UsrCod = -1
Gbl.Usrs.Other.UsrDat.UsrCod = Nck_GetUsrCodFromNickname (Gbl.Usrs.Other.UsrDat.Nickname);
- Gbl.Action.Act = ActSeeOthPubPrf; // Set default action if no other is specified
+ if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
+ Gbl.Action.Act = ActSeeOthPubPrf; // Set default action if no other is specified
+ else
+ Gbl.Usrs.Other.UsrDat.UsrCod = -1L;
}
}
else if (Par_GetParToText ("agd",Nickname,Nck_MAX_BYTES_NICKNAME_FROM_FORM))
diff --git a/swad_photo.c b/swad_photo.c
index f36b9113..a983fb1c 100644
--- a/swad_photo.c
+++ b/swad_photo.c
@@ -1121,32 +1121,20 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
Zoom == Pho_ZOOM && // Make zoom
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window
char IdCaption[Act_MAX_LENGTH_ID];
- bool ItsMe = (Gbl.Usrs.Me.Logged &&
- UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Start form to go to public profile *****/
if (PutLinkToPublicProfile)
{
if (FormUnique)
{
- if (ItsMe)
- Act_FormStartUnique (ActSeeMyPubPrf);
- else
- {
- Act_FormStartUnique (ActSeeOthPubPrf);
- Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
- }
- Act_LinkFormSubmitUnique (NULL,NULL);
- }
+ Act_FormStartUnique (ActSeeOthPubPrf);
+ Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
+ Act_LinkFormSubmitUnique (NULL,NULL);
+ }
else
{
- if (ItsMe)
- Act_FormStart (ActSeeMyPubPrf);
- else
- {
- Act_FormStart (ActSeeOthPubPrf);
- Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
- }
+ Act_FormStart (ActSeeOthPubPrf);
+ Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (NULL,NULL,NULL);
}
}
diff --git a/swad_profile.c b/swad_profile.c
index cf10a885..36bf0934 100644
--- a/swad_profile.c
+++ b/swad_profile.c
@@ -73,6 +73,8 @@ extern struct Globals Gbl;
static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickname);
+static void Prf_ShowUserProfileAndTimeline (void);
+
static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *EncryptedUsrCod);
static unsigned long Prf_GetRankingFigure (long UsrCod,const char *FieldName);
@@ -131,7 +133,8 @@ void Prf_PutLinkMyPublicProfile (void)
{
extern const char *Txt_My_public_profile;
- Lay_PutContextualLink (ActSeeMyPubPrf,NULL,
+ Lay_PutContextualLink (ActSeeOthPubPrf,
+ Usr_PutParamMyUsrCodEncrypted,
"usr64x64.gif",
Txt_My_public_profile,Txt_My_public_profile,
NULL);
@@ -207,19 +210,6 @@ static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickna
Act_FormEnd ();
}
-/*****************************************************************************/
-/************************** Show my public profile ***************************/
-/*****************************************************************************/
-
-void Prf_ShowMyProfile (void)
- {
- extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
-
- if (!Prf_ShowUserProfile (&Gbl.Usrs.Me.UsrDat))
- /* Show error message */
- Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
- }
-
/*****************************************************************************/
/******************** Get user and show a user's profile *********************/
/*****************************************************************************/
@@ -227,46 +217,56 @@ void Prf_ShowMyProfile (void)
void Prf_GetUsrDatAndShowUserProfile (void)
{
- extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
- bool Error;
-
/***** Get user's data *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod <= 0)
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
- Error = !Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat);
/***** Show profile and timeline *****/
- if (!Error)
+ if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
/* Show profile */
- Error = !Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat);
-
- if (Error)
- {
- /* Show error message */
- Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
-
- /* Request nickname again */
- Prf_RequestUserProfileWithDefaultNickname ("");
- }
- else if (Gbl.Usrs.Me.Logged) // Timeline visible only by logged users
- {
- /* Start section */
- fprintf (Gbl.F.Out,"