diff --git a/icon/share64x64.png b/icon/share64x64.png new file mode 100644 index 00000000..a7dd1ae2 Binary files /dev/null and b/icon/share64x64.png differ diff --git a/icon/shared64x64.png b/icon/shared64x64.png new file mode 100644 index 00000000..da88d741 Binary files /dev/null and b/icon/shared64x64.png differ diff --git a/sql/cambios.sql b/sql/cambios.sql index 57577841..16dde9cb 100644 --- a/sql/cambios.sql +++ b/sql/cambios.sql @@ -11200,4 +11200,9 @@ DROP TABLE IF EXISTS social_timeline; CREATE TABLE IF NOT EXISTS social_timeline (SocCod BIGINT NOT NULL AUTO_INCREMENT,AuthorCod INT NOT NULL,PublisherCod INT NOT NULL,NotCod BIGINT NOT NULL,TimePublish DATETIME NOT NULL,UNIQUE INDEX(SocCod),INDEX(AuthorCod),INDEX(PublisherCod),INDEX(NotCod),INDEX(TimePublish)); INSERT INTO social_timeline (AuthorCod,PublisherCod,NotCod,TimePublish) SELECT UsrCod,UsrCod,NotCod,TimeNote FROM social_notes ORDER BY NotCod; - \ No newline at end of file + +SELECT MIN(PubCod) FROM social_timeline WHERE PublisherCod IN (SELECT '1' UNION SELECT FollowedCod FROM usr_follow WHERE FollowerCod='1') GROUP BY NotCod; + + + + \ No newline at end of file diff --git a/swad_ID.c b/swad_ID.c index b2f3e52d..47ccefdb 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_ID.h b/swad_ID.h index 7c932f3f..d43139ab 100644 --- a/swad_ID.h +++ b/swad_ID.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_QR.c b/swad_QR.c index 684bc36e..076c666e 100644 --- a/swad_QR.c +++ b/swad_QR.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_QR.h b/swad_QR.h index 864a82ec..cca5ab99 100644 --- a/swad_QR.h +++ b/swad_QR.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_RSS.c b/swad_RSS.c index 467164c8..c7da30a8 100644 --- a/swad_RSS.c +++ b/swad_RSS.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_RSS.h b/swad_RSS.h index 4eff13f7..d16ec978 100644 --- a/swad_RSS.h +++ b/swad_RSS.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_account.c b/swad_account.c index 6ea6a9eb..cbda824f 100644 --- a/swad_account.c +++ b/swad_account.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_account.h b/swad_account.h index 80c02c45..18e2833f 100644 --- a/swad_account.h +++ b/swad_account.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_action.c b/swad_action.c index f676b1fd..9169eaa2 100644 --- a/swad_action.c +++ b/swad_action.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -1004,8 +1004,10 @@ Social: 839. ActReqSocPst Write a public social post to be displayed in the timeline 840. ActRcvSocPst Receive a public social post to be displayed in the timeline - 841. ActReqRemSocPub Request the removal of a social note (only if it is a post) - 842. ActRemSocPub Remove a social note (only if it is a post) +NEW!!!!!!!!. ActShaSocPub Share a social publishing +NEW!!!!!!!!. ActUnsSocPub Unshare a previously shared social publishing + 841. ActReqRemSocPub Request the removal of a social publishing (only if it is a post) + 842. ActRemSocPub Remove a social publishing (only if it is a post) 843. ActSeePubPrf Show a public user's profile 844. ActCal1stClkTim Calculate first click time from log and store into user's figures 845. ActCalNumClk Calculate number of clicks from log and store into user's figures @@ -2315,8 +2317,10 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActReqSocPst */{1491,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_FormSocialPost ,NULL}, /* ActRcvSocPst */{1492,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveSocialPost ,NULL}, + /* ActShaSocPub */{1495,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ShareSocialPublishing ,NULL}, + /* ActUnsSocPub */{1496,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_UnshareSocialPublishing ,NULL}, /* ActReqRemSocPub */{1494,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RequestRemovalSocialNote ,NULL}, - /* ActRemSocPub */{1493,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RemoveSocialPublishing ,NULL}, + /* ActRemSocPub */{1493,-1,TabSoc,ActSeeSocAct ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RemoveSocialPublishing ,NULL}, /* ActSeePubPrf */{1402,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_GetUsrCodAndShowUserProfile,NULL}, /* ActCal1stClkTim */{1405,-1,TabSoc,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_CalculateFirstClickTime ,NULL}, @@ -4159,6 +4163,8 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActRcvSocPst, // #1492 ActRemSocPub, // #1493 ActReqRemSocPub, // #1494 + ActShaSocPub, // #1495 + ActUnsSocPub, // #1496 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index 6868c1af..fb78db03 100644 --- a/swad_action.h +++ b/swad_action.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -71,9 +71,9 @@ typedef enum typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (7+52+15+90+72+67+205+183+143+151+36+27+82) +#define Act_NUM_ACTIONS (7+52+15+90+72+67+205+183+143+153+36+27+82) -#define Act_MAX_ACTION_COD 1494 +#define Act_MAX_ACTION_COD 1496 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20 @@ -1043,155 +1043,157 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica // Secondary actions #define ActReqSocPst (ActLstClk+ 5) #define ActRcvSocPst (ActLstClk+ 6) -#define ActReqRemSocPub (ActLstClk+ 7) -#define ActRemSocPub (ActLstClk+ 8) +#define ActShaSocPub (ActLstClk+ 7) +#define ActUnsSocPub (ActLstClk+ 8) +#define ActReqRemSocPub (ActLstClk+ 9) +#define ActRemSocPub (ActLstClk+ 10) -#define ActSeePubPrf (ActLstClk+ 9) -#define ActCal1stClkTim (ActLstClk+ 10) -#define ActCalNumClk (ActLstClk+ 11) -#define ActCalNumFilVie (ActLstClk+ 12) -#define ActCalNumForPst (ActLstClk+ 13) -#define ActCalNumMsgSnt (ActLstClk+ 14) +#define ActSeePubPrf (ActLstClk+ 11) +#define ActCal1stClkTim (ActLstClk+ 12) +#define ActCalNumClk (ActLstClk+ 13) +#define ActCalNumFilVie (ActLstClk+ 14) +#define ActCalNumForPst (ActLstClk+ 15) +#define ActCalNumMsgSnt (ActLstClk+ 16) -#define ActFolUsr (ActLstClk+ 15) -#define ActUnfUsr (ActLstClk+ 16) -#define ActSeeFlg (ActLstClk+ 17) -#define ActSeeFlr (ActLstClk+ 18) +#define ActFolUsr (ActLstClk+ 17) +#define ActUnfUsr (ActLstClk+ 18) +#define ActSeeFlg (ActLstClk+ 19) +#define ActSeeFlr (ActLstClk+ 20) -#define ActSeeForCrsUsr (ActLstClk+ 19) -#define ActSeeForCrsTch (ActLstClk+ 20) -#define ActSeeForDegUsr (ActLstClk+ 21) -#define ActSeeForDegTch (ActLstClk+ 22) -#define ActSeeForCtrUsr (ActLstClk+ 23) -#define ActSeeForCtrTch (ActLstClk+ 24) -#define ActSeeForInsUsr (ActLstClk+ 25) -#define ActSeeForInsTch (ActLstClk+ 26) -#define ActSeeForGenUsr (ActLstClk+ 27) -#define ActSeeForGenTch (ActLstClk+ 28) -#define ActSeeForSWAUsr (ActLstClk+ 29) -#define ActSeeForSWATch (ActLstClk+ 30) -#define ActSeePstForCrsUsr (ActLstClk+ 31) -#define ActSeePstForCrsTch (ActLstClk+ 32) -#define ActSeePstForDegUsr (ActLstClk+ 33) -#define ActSeePstForDegTch (ActLstClk+ 34) -#define ActSeePstForCtrUsr (ActLstClk+ 35) -#define ActSeePstForCtrTch (ActLstClk+ 36) -#define ActSeePstForInsUsr (ActLstClk+ 37) -#define ActSeePstForInsTch (ActLstClk+ 38) -#define ActSeePstForGenUsr (ActLstClk+ 39) -#define ActSeePstForGenTch (ActLstClk+ 40) -#define ActSeePstForSWAUsr (ActLstClk+ 41) -#define ActSeePstForSWATch (ActLstClk+ 42) -#define ActRcvThrForCrsUsr (ActLstClk+ 43) -#define ActRcvThrForCrsTch (ActLstClk+ 44) -#define ActRcvThrForDegUsr (ActLstClk+ 45) -#define ActRcvThrForDegTch (ActLstClk+ 46) -#define ActRcvThrForCtrUsr (ActLstClk+ 47) -#define ActRcvThrForCtrTch (ActLstClk+ 48) -#define ActRcvThrForInsUsr (ActLstClk+ 49) -#define ActRcvThrForInsTch (ActLstClk+ 50) -#define ActRcvThrForGenUsr (ActLstClk+ 51) -#define ActRcvThrForGenTch (ActLstClk+ 52) -#define ActRcvThrForSWAUsr (ActLstClk+ 53) -#define ActRcvThrForSWATch (ActLstClk+ 54) -#define ActRcvRepForCrsUsr (ActLstClk+ 55) -#define ActRcvRepForCrsTch (ActLstClk+ 56) -#define ActRcvRepForDegUsr (ActLstClk+ 57) -#define ActRcvRepForDegTch (ActLstClk+ 58) -#define ActRcvRepForCtrUsr (ActLstClk+ 59) -#define ActRcvRepForCtrTch (ActLstClk+ 60) -#define ActRcvRepForInsUsr (ActLstClk+ 61) -#define ActRcvRepForInsTch (ActLstClk+ 62) -#define ActRcvRepForGenUsr (ActLstClk+ 63) -#define ActRcvRepForGenTch (ActLstClk+ 64) -#define ActRcvRepForSWAUsr (ActLstClk+ 65) -#define ActRcvRepForSWATch (ActLstClk+ 66) -#define ActReqDelThrCrsUsr (ActLstClk+ 67) -#define ActReqDelThrCrsTch (ActLstClk+ 68) -#define ActReqDelThrDegUsr (ActLstClk+ 69) -#define ActReqDelThrDegTch (ActLstClk+ 70) -#define ActReqDelThrCtrUsr (ActLstClk+ 71) -#define ActReqDelThrCtrTch (ActLstClk+ 72) -#define ActReqDelThrInsUsr (ActLstClk+ 73) -#define ActReqDelThrInsTch (ActLstClk+ 74) -#define ActReqDelThrGenUsr (ActLstClk+ 75) -#define ActReqDelThrGenTch (ActLstClk+ 76) -#define ActReqDelThrSWAUsr (ActLstClk+ 77) -#define ActReqDelThrSWATch (ActLstClk+ 78) -#define ActDelThrForCrsUsr (ActLstClk+ 79) -#define ActDelThrForCrsTch (ActLstClk+ 80) -#define ActDelThrForDegUsr (ActLstClk+ 81) -#define ActDelThrForDegTch (ActLstClk+ 82) -#define ActDelThrForCtrUsr (ActLstClk+ 83) -#define ActDelThrForCtrTch (ActLstClk+ 84) -#define ActDelThrForInsUsr (ActLstClk+ 85) -#define ActDelThrForInsTch (ActLstClk+ 86) -#define ActDelThrForGenUsr (ActLstClk+ 87) -#define ActDelThrForGenTch (ActLstClk+ 88) -#define ActDelThrForSWAUsr (ActLstClk+ 89) -#define ActDelThrForSWATch (ActLstClk+ 90) -#define ActCutThrForCrsUsr (ActLstClk+ 91) -#define ActCutThrForCrsTch (ActLstClk+ 92) -#define ActCutThrForDegUsr (ActLstClk+ 93) -#define ActCutThrForDegTch (ActLstClk+ 94) -#define ActCutThrForCtrUsr (ActLstClk+ 95) -#define ActCutThrForCtrTch (ActLstClk+ 96) -#define ActCutThrForInsUsr (ActLstClk+ 97) -#define ActCutThrForInsTch (ActLstClk+ 98) -#define ActCutThrForGenUsr (ActLstClk+ 99) -#define ActCutThrForGenTch (ActLstClk+100) -#define ActCutThrForSWAUsr (ActLstClk+101) -#define ActCutThrForSWATch (ActLstClk+102) -#define ActPasThrForCrsUsr (ActLstClk+103) -#define ActPasThrForCrsTch (ActLstClk+104) -#define ActPasThrForDegUsr (ActLstClk+105) -#define ActPasThrForDegTch (ActLstClk+106) -#define ActPasThrForCtrUsr (ActLstClk+107) -#define ActPasThrForCtrTch (ActLstClk+108) -#define ActPasThrForInsUsr (ActLstClk+109) -#define ActPasThrForInsTch (ActLstClk+110) -#define ActPasThrForGenUsr (ActLstClk+111) -#define ActPasThrForGenTch (ActLstClk+112) -#define ActPasThrForSWAUsr (ActLstClk+113) -#define ActPasThrForSWATch (ActLstClk+114) -#define ActDelPstForCrsUsr (ActLstClk+115) -#define ActDelPstForCrsTch (ActLstClk+116) -#define ActDelPstForDegUsr (ActLstClk+117) -#define ActDelPstForDegTch (ActLstClk+118) -#define ActDelPstForCtrUsr (ActLstClk+119) -#define ActDelPstForCtrTch (ActLstClk+120) -#define ActDelPstForInsUsr (ActLstClk+121) -#define ActDelPstForInsTch (ActLstClk+122) -#define ActDelPstForGenUsr (ActLstClk+123) -#define ActDelPstForGenTch (ActLstClk+124) -#define ActDelPstForSWAUsr (ActLstClk+125) -#define ActDelPstForSWATch (ActLstClk+126) -#define ActEnbPstForCrsUsr (ActLstClk+127) -#define ActEnbPstForCrsTch (ActLstClk+128) -#define ActEnbPstForDegUsr (ActLstClk+129) -#define ActEnbPstForDegTch (ActLstClk+130) -#define ActEnbPstForCtrUsr (ActLstClk+131) -#define ActEnbPstForCtrTch (ActLstClk+132) -#define ActEnbPstForInsUsr (ActLstClk+133) -#define ActEnbPstForInsTch (ActLstClk+134) -#define ActEnbPstForGenUsr (ActLstClk+135) -#define ActEnbPstForGenTch (ActLstClk+136) -#define ActEnbPstForSWAUsr (ActLstClk+137) -#define ActEnbPstForSWATch (ActLstClk+138) -#define ActDisPstForCrsUsr (ActLstClk+139) -#define ActDisPstForCrsTch (ActLstClk+140) -#define ActDisPstForDegUsr (ActLstClk+141) -#define ActDisPstForDegTch (ActLstClk+142) -#define ActDisPstForCtrUsr (ActLstClk+143) -#define ActDisPstForCtrTch (ActLstClk+144) -#define ActDisPstForInsUsr (ActLstClk+145) -#define ActDisPstForInsTch (ActLstClk+146) -#define ActDisPstForGenUsr (ActLstClk+147) -#define ActDisPstForGenTch (ActLstClk+148) -#define ActDisPstForSWAUsr (ActLstClk+149) -#define ActDisPstForSWATch (ActLstClk+150) +#define ActSeeForCrsUsr (ActLstClk+ 21) +#define ActSeeForCrsTch (ActLstClk+ 22) +#define ActSeeForDegUsr (ActLstClk+ 23) +#define ActSeeForDegTch (ActLstClk+ 24) +#define ActSeeForCtrUsr (ActLstClk+ 25) +#define ActSeeForCtrTch (ActLstClk+ 26) +#define ActSeeForInsUsr (ActLstClk+ 27) +#define ActSeeForInsTch (ActLstClk+ 28) +#define ActSeeForGenUsr (ActLstClk+ 29) +#define ActSeeForGenTch (ActLstClk+ 30) +#define ActSeeForSWAUsr (ActLstClk+ 31) +#define ActSeeForSWATch (ActLstClk+ 32) +#define ActSeePstForCrsUsr (ActLstClk+ 33) +#define ActSeePstForCrsTch (ActLstClk+ 34) +#define ActSeePstForDegUsr (ActLstClk+ 35) +#define ActSeePstForDegTch (ActLstClk+ 36) +#define ActSeePstForCtrUsr (ActLstClk+ 37) +#define ActSeePstForCtrTch (ActLstClk+ 38) +#define ActSeePstForInsUsr (ActLstClk+ 39) +#define ActSeePstForInsTch (ActLstClk+ 40) +#define ActSeePstForGenUsr (ActLstClk+ 41) +#define ActSeePstForGenTch (ActLstClk+ 42) +#define ActSeePstForSWAUsr (ActLstClk+ 43) +#define ActSeePstForSWATch (ActLstClk+ 44) +#define ActRcvThrForCrsUsr (ActLstClk+ 45) +#define ActRcvThrForCrsTch (ActLstClk+ 46) +#define ActRcvThrForDegUsr (ActLstClk+ 47) +#define ActRcvThrForDegTch (ActLstClk+ 48) +#define ActRcvThrForCtrUsr (ActLstClk+ 49) +#define ActRcvThrForCtrTch (ActLstClk+ 50) +#define ActRcvThrForInsUsr (ActLstClk+ 51) +#define ActRcvThrForInsTch (ActLstClk+ 52) +#define ActRcvThrForGenUsr (ActLstClk+ 53) +#define ActRcvThrForGenTch (ActLstClk+ 54) +#define ActRcvThrForSWAUsr (ActLstClk+ 55) +#define ActRcvThrForSWATch (ActLstClk+ 56) +#define ActRcvRepForCrsUsr (ActLstClk+ 57) +#define ActRcvRepForCrsTch (ActLstClk+ 58) +#define ActRcvRepForDegUsr (ActLstClk+ 59) +#define ActRcvRepForDegTch (ActLstClk+ 60) +#define ActRcvRepForCtrUsr (ActLstClk+ 61) +#define ActRcvRepForCtrTch (ActLstClk+ 62) +#define ActRcvRepForInsUsr (ActLstClk+ 63) +#define ActRcvRepForInsTch (ActLstClk+ 64) +#define ActRcvRepForGenUsr (ActLstClk+ 65) +#define ActRcvRepForGenTch (ActLstClk+ 66) +#define ActRcvRepForSWAUsr (ActLstClk+ 67) +#define ActRcvRepForSWATch (ActLstClk+ 68) +#define ActReqDelThrCrsUsr (ActLstClk+ 69) +#define ActReqDelThrCrsTch (ActLstClk+ 70) +#define ActReqDelThrDegUsr (ActLstClk+ 71) +#define ActReqDelThrDegTch (ActLstClk+ 72) +#define ActReqDelThrCtrUsr (ActLstClk+ 73) +#define ActReqDelThrCtrTch (ActLstClk+ 74) +#define ActReqDelThrInsUsr (ActLstClk+ 75) +#define ActReqDelThrInsTch (ActLstClk+ 76) +#define ActReqDelThrGenUsr (ActLstClk+ 77) +#define ActReqDelThrGenTch (ActLstClk+ 78) +#define ActReqDelThrSWAUsr (ActLstClk+ 79) +#define ActReqDelThrSWATch (ActLstClk+ 80) +#define ActDelThrForCrsUsr (ActLstClk+ 81) +#define ActDelThrForCrsTch (ActLstClk+ 82) +#define ActDelThrForDegUsr (ActLstClk+ 83) +#define ActDelThrForDegTch (ActLstClk+ 84) +#define ActDelThrForCtrUsr (ActLstClk+ 85) +#define ActDelThrForCtrTch (ActLstClk+ 86) +#define ActDelThrForInsUsr (ActLstClk+ 87) +#define ActDelThrForInsTch (ActLstClk+ 88) +#define ActDelThrForGenUsr (ActLstClk+ 89) +#define ActDelThrForGenTch (ActLstClk+ 90) +#define ActDelThrForSWAUsr (ActLstClk+ 91) +#define ActDelThrForSWATch (ActLstClk+ 92) +#define ActCutThrForCrsUsr (ActLstClk+ 93) +#define ActCutThrForCrsTch (ActLstClk+ 94) +#define ActCutThrForDegUsr (ActLstClk+ 95) +#define ActCutThrForDegTch (ActLstClk+ 96) +#define ActCutThrForCtrUsr (ActLstClk+ 97) +#define ActCutThrForCtrTch (ActLstClk+ 98) +#define ActCutThrForInsUsr (ActLstClk+ 99) +#define ActCutThrForInsTch (ActLstClk+100) +#define ActCutThrForGenUsr (ActLstClk+101) +#define ActCutThrForGenTch (ActLstClk+102) +#define ActCutThrForSWAUsr (ActLstClk+103) +#define ActCutThrForSWATch (ActLstClk+104) +#define ActPasThrForCrsUsr (ActLstClk+105) +#define ActPasThrForCrsTch (ActLstClk+106) +#define ActPasThrForDegUsr (ActLstClk+107) +#define ActPasThrForDegTch (ActLstClk+108) +#define ActPasThrForCtrUsr (ActLstClk+109) +#define ActPasThrForCtrTch (ActLstClk+110) +#define ActPasThrForInsUsr (ActLstClk+111) +#define ActPasThrForInsTch (ActLstClk+112) +#define ActPasThrForGenUsr (ActLstClk+113) +#define ActPasThrForGenTch (ActLstClk+114) +#define ActPasThrForSWAUsr (ActLstClk+115) +#define ActPasThrForSWATch (ActLstClk+116) +#define ActDelPstForCrsUsr (ActLstClk+117) +#define ActDelPstForCrsTch (ActLstClk+118) +#define ActDelPstForDegUsr (ActLstClk+119) +#define ActDelPstForDegTch (ActLstClk+120) +#define ActDelPstForCtrUsr (ActLstClk+121) +#define ActDelPstForCtrTch (ActLstClk+122) +#define ActDelPstForInsUsr (ActLstClk+123) +#define ActDelPstForInsTch (ActLstClk+124) +#define ActDelPstForGenUsr (ActLstClk+125) +#define ActDelPstForGenTch (ActLstClk+126) +#define ActDelPstForSWAUsr (ActLstClk+127) +#define ActDelPstForSWATch (ActLstClk+128) +#define ActEnbPstForCrsUsr (ActLstClk+129) +#define ActEnbPstForCrsTch (ActLstClk+130) +#define ActEnbPstForDegUsr (ActLstClk+131) +#define ActEnbPstForDegTch (ActLstClk+132) +#define ActEnbPstForCtrUsr (ActLstClk+133) +#define ActEnbPstForCtrTch (ActLstClk+134) +#define ActEnbPstForInsUsr (ActLstClk+135) +#define ActEnbPstForInsTch (ActLstClk+136) +#define ActEnbPstForGenUsr (ActLstClk+137) +#define ActEnbPstForGenTch (ActLstClk+138) +#define ActEnbPstForSWAUsr (ActLstClk+139) +#define ActEnbPstForSWATch (ActLstClk+140) +#define ActDisPstForCrsUsr (ActLstClk+141) +#define ActDisPstForCrsTch (ActLstClk+142) +#define ActDisPstForDegUsr (ActLstClk+143) +#define ActDisPstForDegTch (ActLstClk+144) +#define ActDisPstForCtrUsr (ActLstClk+145) +#define ActDisPstForCtrTch (ActLstClk+146) +#define ActDisPstForInsUsr (ActLstClk+147) +#define ActDisPstForInsTch (ActLstClk+148) +#define ActDisPstForGenUsr (ActLstClk+149) +#define ActDisPstForGenTch (ActLstClk+150) +#define ActDisPstForSWAUsr (ActLstClk+151) +#define ActDisPstForSWATch (ActLstClk+152) -#define ActCht (ActLstClk+151) +#define ActCht (ActLstClk+153) /*****************************************************************************/ /******************************* Messages tab ********************************/ diff --git a/swad_announcement.c b/swad_announcement.c index c688683e..9bbd7815 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_announcement.h b/swad_announcement.h index bfb037dc..1d411286 100644 --- a/swad_announcement.h +++ b/swad_announcement.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_assignment.c b/swad_assignment.c index 6b3a05d5..b20c3eb9 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_assignment.h b/swad_assignment.h index 3ca2fef4..c945fe49 100644 --- a/swad_assignment.h +++ b/swad_assignment.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_attendance.c b/swad_attendance.c index 82441455..e8292b9a 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_attendance.h b/swad_attendance.h index 46ec7baf..f6f857cb 100644 --- a/swad_attendance.h +++ b/swad_attendance.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_banner.c b/swad_banner.c index 25f06f0f..ac9543ce 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_banner.h b/swad_banner.h index 9fbb2b41..3eb2e9be 100644 --- a/swad_banner.h +++ b/swad_banner.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_calendar.c b/swad_calendar.c index 85df1d83..13656825 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_calendar.h b/swad_calendar.h index bf7e9f2c..9aa456d2 100644 --- a/swad_calendar.h +++ b/swad_calendar.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_centre.c b/swad_centre.c index e620f39e..d99e93fd 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_centre.h b/swad_centre.h index 9665b0c9..4f6cbd6f 100644 --- a/swad_centre.h +++ b/swad_centre.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_changelog.h b/swad_changelog.h index 953fa85e..9377091e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -117,13 +117,18 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.87 (2015-12-31)" +#define Log_PLATFORM_VERSION "SWAD 15.88 (2016-01-01)" #define CSS_FILE "swad15.84.2.css" #define JS_FILE "swad15.77.7.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 15.88: Jan 01, 2016 New buttons in social timeline to share/unshare a social publishing. (189841 lines) + 2 changes necessary in database: +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1495','es','N','Compartir comentario social'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1496','es','N','Dejar de compartir comentario social'); + Version 15.87: Dec 31, 2015 New database table to store users who write or share social notes. (189594 lines) 3 changes necessary in database: CREATE TABLE IF NOT EXISTS social_timeline (PubCod BIGINT NOT NULL AUTO_INCREMENT,AuthorCod INT NOT NULL,PublisherCod INT NOT NULL,NotCod BIGINT NOT NULL,TimePublish DATETIME NOT NULL,UNIQUE INDEX(PubCod),INDEX(AuthorCod),INDEX(PublisherCod),INDEX(NotCod),INDEX(TimePublish)); diff --git a/swad_chat.c b/swad_chat.c index 435dc2bd..5f51aa34 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_chat.h b/swad_chat.h index a80f6ee5..c51ad081 100644 --- a/swad_chat.h +++ b/swad_chat.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_config.c b/swad_config.c index dc69612c..390d730d 100644 --- a/swad_config.c +++ b/swad_config.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_config.h b/swad_config.h index d3c3314f..18832188 100644 --- a/swad_config.h +++ b/swad_config.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_connected.c b/swad_connected.c index 69eb684d..fb97fc3e 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_connected.h b/swad_connected.h index 301a84fd..2f566cb4 100644 --- a/swad_connected.h +++ b/swad_connected.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_constant.h b/swad_constant.h index d576e73f..5a1338f4 100644 --- a/swad_constant.h +++ b/swad_constant.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_country.c b/swad_country.c index f9db47ef..8a40234c 100644 --- a/swad_country.c +++ b/swad_country.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_country.h b/swad_country.h index 303add3a..13a904bd 100644 --- a/swad_country.h +++ b/swad_country.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_course.c b/swad_course.c index 6c4f8080..f47aeab6 100644 --- a/swad_course.c +++ b/swad_course.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_course.h b/swad_course.h index 64def342..4cbfdced 100644 --- a/swad_course.h +++ b/swad_course.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_cryptography.c b/swad_cryptography.c index 50830d11..d5f89708 100644 --- a/swad_cryptography.c +++ b/swad_cryptography.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_cryptography.h b/swad_cryptography.h index 6622dcf3..8d901af8 100644 --- a/swad_cryptography.h +++ b/swad_cryptography.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_database.c b/swad_database.c index 6ba45a76..d9afa845 100644 --- a/swad_database.c +++ b/swad_database.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_database.h b/swad_database.h index 6e4a93e4..af6b4993 100644 --- a/swad_database.h +++ b/swad_database.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_date.c b/swad_date.c index f7dcf40c..25498e98 100644 --- a/swad_date.c +++ b/swad_date.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_date.h b/swad_date.h index f6117f04..ccbd4d6e 100644 --- a/swad_date.h +++ b/swad_date.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_degree.c b/swad_degree.c index a9a002e6..1d206d7a 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_degree.h b/swad_degree.h index c6b47cdd..e0968c4d 100644 --- a/swad_degree.h +++ b/swad_degree.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_department.c b/swad_department.c index 3cb3ec60..65753a5c 100644 --- a/swad_department.c +++ b/swad_department.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_department.h b/swad_department.h index ed067620..73bbbe74 100644 --- a/swad_department.h +++ b/swad_department.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_enrollment.c b/swad_enrollment.c index 348c038c..52e71167 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_enrollment.h b/swad_enrollment.h index eec19fbc..bb962ac1 100644 --- a/swad_enrollment.h +++ b/swad_enrollment.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_exam.h b/swad_exam.h index daedadfe..e5efdfe2 100644 --- a/swad_exam.h +++ b/swad_exam.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_file.c b/swad_file.c index 98abc3b7..a147a8f1 100644 --- a/swad_file.c +++ b/swad_file.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_file.h b/swad_file.h index fd512a67..b6870521 100644 --- a/swad_file.h +++ b/swad_file.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_file_browser.c b/swad_file_browser.c index 7596608f..2a2b9e7a 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_file_browser.h b/swad_file_browser.h index 132ba0b0..8de995be 100644 --- a/swad_file_browser.h +++ b/swad_file_browser.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_follow.c b/swad_follow.c index 89261057..0ead33a4 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_follow.h b/swad_follow.h index 4f894fd2..049e5559 100644 --- a/swad_follow.h +++ b/swad_follow.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_forum.c b/swad_forum.c index 4afff2da..17a64959 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_forum.h b/swad_forum.h index 0ab34b1b..3a7b585b 100644 --- a/swad_forum.h +++ b/swad_forum.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_global.c b/swad_global.c index 1b72f3ee..297d80e3 100644 --- a/swad_global.c +++ b/swad_global.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_global.h b/swad_global.h index 94d68871..53899129 100644 --- a/swad_global.h +++ b/swad_global.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_group.c b/swad_group.c index 22ecfb6c..8439a959 100644 --- a/swad_group.c +++ b/swad_group.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_group.h b/swad_group.h index 5439ca56..e1a8e7b4 100644 --- a/swad_group.h +++ b/swad_group.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_help.c b/swad_help.c index 84e69ae3..2d1416f4 100644 --- a/swad_help.c +++ b/swad_help.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_help.h b/swad_help.h index 0888a9e2..abe48c97 100644 --- a/swad_help.h +++ b/swad_help.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_holiday.c b/swad_holiday.c index 8dd3227f..2bf57b69 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_holiday.h b/swad_holiday.h index 0290ca02..d3306d42 100644 --- a/swad_holiday.h +++ b/swad_holiday.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_icon.c b/swad_icon.c index d80b993a..cb62f52b 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_icon.h b/swad_icon.h index 2a320ebd..623725c5 100644 --- a/swad_icon.h +++ b/swad_icon.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_import.c b/swad_import.c index 5564f2f0..adb1a299 100644 --- a/swad_import.c +++ b/swad_import.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_import.h b/swad_import.h index 7a4c58f0..97ea9662 100644 --- a/swad_import.h +++ b/swad_import.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_indicator.c b/swad_indicator.c index f79d7ff9..8a573424 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_indicator.h b/swad_indicator.h index 05ffdc50..33b05bc6 100644 --- a/swad_indicator.h +++ b/swad_indicator.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_info.c b/swad_info.c index 161deac3..bf1ba862 100644 --- a/swad_info.c +++ b/swad_info.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_info.h b/swad_info.h index 90364c35..c2497702 100644 --- a/swad_info.h +++ b/swad_info.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_institution.c b/swad_institution.c index 02ce50e2..72595365 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_institution.h b/swad_institution.h index b79cf26e..22c1a98f 100644 --- a/swad_institution.h +++ b/swad_institution.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_layout.c b/swad_layout.c index 8637edde..c7deaf2d 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_layout.h b/swad_layout.h index 0507c943..e1885c08 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_link.c b/swad_link.c index 305d38b7..ac287f94 100644 --- a/swad_link.c +++ b/swad_link.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_link.h b/swad_link.h index 814cc773..f7ca0b7e 100644 --- a/swad_link.h +++ b/swad_link.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_logo.c b/swad_logo.c index 6705b89b..e08e9892 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_logo.h b/swad_logo.h index 4419721d..8b4b9bd3 100644 --- a/swad_logo.h +++ b/swad_logo.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_mail.c b/swad_mail.c index f22b0e58..2f5bc6fc 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -229,7 +229,7 @@ static void Mai_GetListMailDomainsAllowedForNotif (void) // ...because a unique temporary table can not be used twice in the same query /***** Create temporary table with all the mail domains present in users' emails table *****/ - sprintf (Query,"DROP TABLE IF EXISTS T1,T2"); + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS T1,T2"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary tables"); @@ -306,7 +306,7 @@ static void Mai_GetListMailDomainsAllowedForNotif (void) DB_FreeMySQLResult (&mysql_res); /***** Drop temporary table *****/ - sprintf (Query,"DROP TABLE IF EXISTS T1,T2"); + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS T1,T2"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary tables"); } diff --git a/swad_mail.h b/swad_mail.h index 0c338fa7..e67e17a4 100644 --- a/swad_mail.h +++ b/swad_mail.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_main.c b/swad_main.c index ce012f88..fe035bbf 100644 --- a/swad_main.c +++ b/swad_main.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_mark.c b/swad_mark.c index e971d480..7a7e454d 100644 --- a/swad_mark.c +++ b/swad_mark.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_mark.h b/swad_mark.h index e0235f33..536d4c36 100644 --- a/swad_mark.h +++ b/swad_mark.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_menu.c b/swad_menu.c index 96dedfb4..a94215a7 100644 --- a/swad_menu.c +++ b/swad_menu.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_menu.h b/swad_menu.h index d5c8e5ab..074b770f 100644 --- a/swad_menu.h +++ b/swad_menu.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_message.c b/swad_message.c index 58feea40..ec7e2ae0 100644 --- a/swad_message.c +++ b/swad_message.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_message.h b/swad_message.h index 6076a7cd..54dcc8dc 100644 --- a/swad_message.h +++ b/swad_message.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_network.c b/swad_network.c index c2108e64..c801a72a 100644 --- a/swad_network.c +++ b/swad_network.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_network.h b/swad_network.h index a2a72779..ae11feca 100644 --- a/swad_network.h +++ b/swad_network.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_nickname.c b/swad_nickname.c index d7cd31a7..e017fde3 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_nickname.h b/swad_nickname.h index f6217ce4..19927e7f 100644 --- a/swad_nickname.h +++ b/swad_nickname.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_notice.c b/swad_notice.c index dd1d2de8..8a2d6be6 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_notice.h b/swad_notice.h index 22f3456c..32b1b0bc 100644 --- a/swad_notice.h +++ b/swad_notice.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_notification.c b/swad_notification.c index f4a8eebd..9fe1e389 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_notification.h b/swad_notification.h index d67a8d7a..d62ff0d1 100644 --- a/swad_notification.h +++ b/swad_notification.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_pagination.c b/swad_pagination.c index af1e7966..60a0cac8 100644 --- a/swad_pagination.c +++ b/swad_pagination.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_pagination.h b/swad_pagination.h index d69e6f90..4f5682a2 100644 --- a/swad_pagination.h +++ b/swad_pagination.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_parameter.c b/swad_parameter.c index e9bc3743..2dad8b1d 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_parameter.h b/swad_parameter.h index 46dcc998..91dfd04e 100644 --- a/swad_parameter.h +++ b/swad_parameter.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_password.c b/swad_password.c index cdf14792..7c6074eb 100644 --- a/swad_password.c +++ b/swad_password.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_password.h b/swad_password.h index 85d6322a..da542bac 100644 --- a/swad_password.h +++ b/swad_password.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_photo.c b/swad_photo.c index bcfadb6e..d6049af9 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_photo.h b/swad_photo.h index f10dc98e..bc8668b6 100644 --- a/swad_photo.h +++ b/swad_photo.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_place.c b/swad_place.c index 1457f348..4e325f26 100644 --- a/swad_place.c +++ b/swad_place.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_place.h b/swad_place.h index b0d7be57..00c67e7f 100644 --- a/swad_place.h +++ b/swad_place.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_plugin.c b/swad_plugin.c index 8c6347c4..be83bbdd 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_plugin.h b/swad_plugin.h index 7fbb47cf..cb01a2a7 100644 --- a/swad_plugin.h +++ b/swad_plugin.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_preference.c b/swad_preference.c index 81a3b427..25cceaae 100644 --- a/swad_preference.c +++ b/swad_preference.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_preference.h b/swad_preference.h index f4fc0b8a..6f01df85 100644 --- a/swad_preference.h +++ b/swad_preference.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_privacy.c b/swad_privacy.c index 9b0b4d51..8a9fbc42 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_privacy.h b/swad_privacy.h index 824b6813..db9acca1 100644 --- a/swad_privacy.h +++ b/swad_privacy.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_profile.c b/swad_profile.c index cbdb36fc..b3591860 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_profile.h b/swad_profile.h index 34ce093f..aee942f5 100644 --- a/swad_profile.h +++ b/swad_profile.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_record.c b/swad_record.c index 7f525e46..367fbcd7 100644 --- a/swad_record.c +++ b/swad_record.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_record.h b/swad_record.h index 13f430e2..fd532a6c 100644 --- a/swad_record.h +++ b/swad_record.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_role.c b/swad_role.c index 8ec73143..68dae703 100644 --- a/swad_role.c +++ b/swad_role.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_role.h b/swad_role.h index aac9b203..06178623 100644 --- a/swad_role.h +++ b/swad_role.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_scope.c b/swad_scope.c index 33f53dba..f3c00c7c 100644 --- a/swad_scope.c +++ b/swad_scope.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_scope.h b/swad_scope.h index fc0bb66d..5eed8b2e 100644 --- a/swad_scope.h +++ b/swad_scope.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_search.c b/swad_search.c index ae60f5ba..66fb6ced 100644 --- a/swad_search.c +++ b/swad_search.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as @@ -867,6 +867,10 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery) { /***** Create temporary table with codes of files in documents and shared areas accessible by me. It is necessary to speed up the second query *****/ + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS my_files_crs,my_files_grp"); + if (mysql_query (&Gbl.mysql,Query)) + DB_ExitOnMySQLError ("can not remove temporary table"); + sprintf (Query,"CREATE TEMPORARY TABLE my_files_crs (FilCod INT NOT NULL,UNIQUE INDEX(FilCod)) ENGINE=MEMORY" " SELECT files.FilCod FROM crs_usr,files" " WHERE crs_usr.UsrCod='%ld'" @@ -878,6 +882,7 @@ static unsigned Sch_SearchDocumentsInMyCoursesInDB (const char *RangeQuery) (unsigned) Brw_ADMI_MARKS_CRS); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not create temporary table"); + sprintf (Query,"CREATE TEMPORARY TABLE my_files_grp (FilCod INT NOT NULL,UNIQUE INDEX(FilCod)) ENGINE=MEMORY" " SELECT files.FilCod FROM crs_grp_usr,files" " WHERE crs_grp_usr.UsrCod='%ld'" diff --git a/swad_search.h b/swad_search.h index a8b09ab2..2f03eb47 100644 --- a/swad_search.h +++ b/swad_search.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_session.c b/swad_session.c index c915ea63..ce7305ab 100644 --- a/swad_session.c +++ b/swad_session.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_session.h b/swad_session.h index 383f424f..d55745b7 100644 --- a/swad_session.h +++ b/swad_session.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_setup.c b/swad_setup.c index 3a6ab0e4..78a73a1b 100644 --- a/swad_setup.c +++ b/swad_setup.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_setup.h b/swad_setup.h index 3427eaff..90efbdd3 100644 --- a/swad_setup.h +++ b/swad_setup.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_social.c b/swad_social.c index 4bda6a00..a02feb8a 100644 --- a/swad_social.c +++ b/swad_social.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as @@ -140,13 +140,21 @@ static void Soc_StartFormGoToAction (Soc_NoteType_t NoteType, long CrsCod,long Cod); static void Soc_GetNoteSummary (const struct SocialNote *SocNot, char *SummaryStr,unsigned MaxChars); +static void Soc_PublishSocialNoteInTimeline (struct SocialPublishing *SocPub); static void Soc_PutLinkToWriteANewPost (void); static void Soc_GetAndWriteSocialPost (long PstCod); +static void Soc_PutFormToShareSocialPublishing (long PubCod); +static void Soc_PutFormToUnshareSocialPublishing (long PubCod); static void Soc_PutFormToRemoveSocialPublishing (long PubCod); static void Soc_PutHiddenParamPubCod (long NotCod); static long Soc_GetParamPubCod (void); + +static void Soc_DeleteASocialPublishingFromDB (const struct SocialPublishing *SocPub, + const struct SocialNote *SocNot); + +static bool Soc_CheckIfNoteIsYetPublishedByMe (long NotCod); static unsigned long Soc_GetNumPubsOfANote (long NotCod); static void Soc_GetDataOfSocialPublishingByCod (struct SocialPublishing *SocPub); static void Soc_GetDataOfSocialNoteByCod (struct SocialNote *SocNot); @@ -162,8 +170,7 @@ void Soc_ShowUsrTimeline (long UsrCod) char Query[512]; /***** Build query to show timeline with publishing of a unique user *****/ - // Publisher code is set to -1 here to get only one row - sprintf (Query,"SELECT DISTINCTROW PubCod,AuthorCod,'-1',NotCod,UNIX_TIMESTAMP(TimePublish)" + sprintf (Query,"SELECT PubCod,AuthorCod,PublisherCod,NotCod,UNIX_TIMESTAMP(TimePublish)" " FROM social_timeline" " WHERE PublisherCod='%ld'" " ORDER BY PubCod DESC LIMIT 10", @@ -189,21 +196,38 @@ void Soc_ShowFollowingTimeline (void) if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod)) Lay_ShowAlert (Lay_INFO,"Usted no sigue a ningún usuario."); // Need translation!!! - /***** Build query to show timeline including the users I am following *****/ - // Publisher code is set to -1 here to get only one row - sprintf (Query,"SELECT DISTINCTROW PubCod,AuthorCod,'-1',NotCod,UNIX_TIMESTAMP(TimePublish)" + /***** Create temporary table with all the publishing codes *****/ + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS pub_cods"); + if (mysql_query (&Gbl.mysql,Query)) + DB_ExitOnMySQLError ("can not remove temporary tables"); + + sprintf (Query,"CREATE TEMPORARY TABLE pub_cods (PubCod BIGINT NOT NULL,UNIQUE INDEX(PubCod)) ENGINE=MEMORY" + " SELECT MIN(PubCod) AS PubCod" " FROM social_timeline" " WHERE PublisherCod IN" " (SELECT '%ld'" " UNION" " SELECT FollowedCod FROM usr_follow WHERE FollowerCod='%ld')" + " GROUP BY NotCod" " ORDER BY PubCod DESC LIMIT 10", Gbl.Usrs.Me.UsrDat.UsrCod, Gbl.Usrs.Me.UsrDat.UsrCod); + if (mysql_query (&Gbl.mysql,Query)) + DB_ExitOnMySQLError ("can not create temporary table"); + + /***** Build query to show timeline including the users I am following *****/ + sprintf (Query,"SELECT PubCod,AuthorCod,PublisherCod,NotCod,UNIX_TIMESTAMP(TimePublish)" + " FROM social_timeline WHERE PubCod IN " + "(SELECT PubCod FROM pub_cods)" + " ORDER BY PubCod DESC"); /***** Show timeline *****/ if (!Soc_ShowTimeline (Query,ActSeeSocAct)) Lay_ShowAlert (Lay_INFO,"No hay actividad pública."); // Need translation!!! + + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS pub_cods"); + if (mysql_query (&Gbl.mysql,Query)) + DB_ExitOnMySQLError ("can not remove temporary tables"); } /*****************************************************************************/ @@ -394,11 +418,25 @@ static void Soc_WriteSocialNote (const struct SocialPublishing *SocPub, Soc_GetAndWriteSocialPost (SocNot->Cod); fprintf (Gbl.F.Out,""); - /* Write form to remove this note */ - if (PutIconRemove && - Gbl.Usrs.Me.Logged && - UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // I am the author - Soc_PutFormToRemoveSocialPublishing (SocPub->PubCod); + /***** Put icons to share/unshare/remove *****/ + if (Gbl.Usrs.Me.Logged) + { + if (UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // I am the author + { + if (PutIconRemove) + /* Put icon to remove this publishing */ + Soc_PutFormToRemoveSocialPublishing (SocPub->PubCod); + } + else // I am not the author + { + if (Soc_CheckIfNoteIsYetPublishedByMe (SocNot->NotCod)) // I have yet published this social note + /* Put icon to unshare this publishing */ + Soc_PutFormToUnshareSocialPublishing (SocPub->PubCod); + else // I have not yet published this social note + /* Put icon to share this publishing */ + Soc_PutFormToShareSocialPublishing (SocPub->PubCod); + } + } } else { @@ -470,7 +508,6 @@ static void Soc_WriteNoteDate (time_t TimeUTC) fprintf (Gbl.F.Out,""); } - /*****************************************************************************/ /********* Put form to go to an action depending on the social note **********/ /*****************************************************************************/ @@ -608,7 +645,7 @@ void Soc_StoreAndPublishSocialNote (Soc_NoteType_t NoteType,long Cod) long CtrCod; long DegCod; long CrsCod; - long NotCod; // Note code stored in database + struct SocialPublishing SocPub; if (NoteType == Soc_NOTE_FORUM_POST) { @@ -642,14 +679,28 @@ void Soc_StoreAndPublishSocialNote (Soc_NoteType_t NoteType,long Cod) (unsigned) NoteType,Gbl.Usrs.Me.UsrDat.UsrCod, CtyCod,InsCod,CtrCod,DegCod,CrsCod, Cod); - NotCod = DB_QueryINSERTandReturnCode (Query,"can not create new social note"); + SocPub.NotCod = DB_QueryINSERTandReturnCode (Query,"can not create new social note"); - /***** Publish social note *****/ + /***** Publish social note in timeline *****/ + SocPub.AuthorCod = + SocPub.PublisherCod = Gbl.Usrs.Me.UsrDat.UsrCod; + Soc_PublishSocialNoteInTimeline (&SocPub); + } + +/*****************************************************************************/ +/***************** Put contextual link to write a new post *******************/ +/*****************************************************************************/ + +static void Soc_PublishSocialNoteInTimeline (struct SocialPublishing *SocPub) + { + char Query[256]; + + /***** Publish social note in timeline *****/ sprintf (Query,"INSERT INTO social_timeline" " (AuthorCod,PublisherCod,NotCod,TimePublish)" " VALUES" " ('%ld','%ld','%ld',NOW())", - Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Me.UsrDat.UsrCod,NotCod); + SocPub->AuthorCod,SocPub->PublisherCod,SocPub->NotCod); DB_QueryINSERT (Query,"can not publish social note"); } @@ -766,7 +817,53 @@ static void Soc_GetAndWriteSocialPost (long PstCod) } /*****************************************************************************/ -/*********************** Form to remove social note **************************/ +/********************* Form to share social publishing ***********************/ +/*****************************************************************************/ + +static void Soc_PutFormToShareSocialPublishing (long PubCod) + { + extern const char *Txt_Share; + + /***** Form to share social publishing *****/ + Act_FormStart (ActShaSocPub); + Soc_PutHiddenParamPubCod (PubCod); + fprintf (Gbl.F.Out,"
" + "" + "
", + Gbl.Prefs.IconsURL, + Txt_Share, + Txt_Share); + Act_FormEnd (); + } + +/*****************************************************************************/ +/************ Form to unshare (stop sharing) social publishing ***************/ +/*****************************************************************************/ + +static void Soc_PutFormToUnshareSocialPublishing (long PubCod) + { + extern const char *Txt_Shared; + + /***** Form to share social publishing *****/ + Act_FormStart (ActUnsSocPub); + Soc_PutHiddenParamPubCod (PubCod); + fprintf (Gbl.F.Out,"
" + "" + "
", + Gbl.Prefs.IconsURL, + Txt_Shared, + Txt_Shared); + Act_FormEnd (); + } + +/*****************************************************************************/ +/******************** Form to remove social publishing ***********************/ /*****************************************************************************/ static void Soc_PutFormToRemoveSocialPublishing (long PubCod) @@ -814,6 +911,86 @@ static long Soc_GetParamPubCod (void) return PubCod; } +/*****************************************************************************/ +/************************* Share a social publishing *************************/ +/*****************************************************************************/ + +void Soc_ShareSocialPublishing (void) + { + extern const char *Txt_Shared; + struct SocialPublishing SocPub; + bool ICanShare; + bool IHavePublishedThisNote; + + /***** Get the code of the social publishing to share *****/ + SocPub.PubCod = Soc_GetParamPubCod (); + + /***** Get data of social publishing *****/ + Soc_GetDataOfSocialPublishingByCod (&SocPub); + + ICanShare = (Gbl.Usrs.Me.Logged && + SocPub.AuthorCod != Gbl.Usrs.Me.UsrDat.UsrCod); // I am not the author + if (ICanShare) + { + /***** Check if I have yet shared this social note *****/ + IHavePublishedThisNote = Soc_CheckIfNoteIsYetPublishedByMe (SocPub.NotCod); + if (!IHavePublishedThisNote) + { + /***** Share (publish social note in timeline) *****/ + SocPub.PublisherCod = Gbl.Usrs.Me.UsrDat.UsrCod; + Soc_PublishSocialNoteInTimeline (&SocPub); + + /***** Message of success *****/ + Lay_ShowAlert (Lay_SUCCESS,Txt_Shared); + } + } + + /***** Write timeline after removing *****/ + Soc_ShowFollowingTimeline (); + } + +/*****************************************************************************/ +/************** Unshare a previously shared social publishing ****************/ +/*****************************************************************************/ + +void Soc_UnshareSocialPublishing (void) + { + extern const char *Txt_Unshared; + struct SocialPublishing SocPub; + struct SocialNote SocNot; + bool ICanUnshare; + bool IHavePublishedThisNote; + + /***** Get the code of the social publishing to unshare *****/ + SocPub.PubCod = Soc_GetParamPubCod (); + + /***** Get data of social publishing *****/ + Soc_GetDataOfSocialPublishingByCod (&SocPub); + + /***** Get data of social note *****/ + SocNot.NotCod = SocPub.NotCod; + Soc_GetDataOfSocialNoteByCod (&SocNot); + + ICanUnshare = (Gbl.Usrs.Me.Logged && + SocPub.AuthorCod != Gbl.Usrs.Me.UsrDat.UsrCod); // I am not the author + if (ICanUnshare) + { + /***** Check if I have yet shared this social note *****/ + IHavePublishedThisNote = Soc_CheckIfNoteIsYetPublishedByMe (SocPub.NotCod); + if (IHavePublishedThisNote) + { + /***** Delete social publishing from database *****/ + Soc_DeleteASocialPublishingFromDB (&SocPub,&SocNot); + + /***** Message of success *****/ + Lay_ShowAlert (Lay_SUCCESS,Txt_Unshared); + } + } + + /***** Write timeline after unsharing *****/ + Soc_ShowFollowingTimeline (); + } + /*****************************************************************************/ /******************* Request the removal of a social note ********************/ /*****************************************************************************/ @@ -879,9 +1056,7 @@ void Soc_RemoveSocialPublishing (void) extern const char *Txt_Comment_removed; struct SocialPublishing SocPub; struct SocialNote SocNot; - unsigned long NumPubs; bool ICanRemove; - char Query[128]; /***** Get the code of the social publishing to remove *****/ SocPub.PubCod = Soc_GetParamPubCod (); @@ -898,30 +1073,8 @@ void Soc_RemoveSocialPublishing (void) SocNot.NoteType == Soc_NOTE_SOCIAL_POST); if (ICanRemove) { - /***** Remove social publishing *****/ - sprintf (Query,"DELETE FROM social_timeline WHERE PubCod='%ld'", - SocPub.PubCod); - DB_QueryDELETE (Query,"can not remove a social publishing"); - - /***** Count number of times this note - is published in timeline after removal *****/ - NumPubs = Soc_GetNumPubsOfANote (SocNot.NotCod); - - if (NumPubs == 0) // This was the last publishing of this note - { - /***** Remove social note *****/ - sprintf (Query,"DELETE FROM social_notes WHERE NotCod='%ld'", - SocNot.NotCod); - DB_QueryDELETE (Query,"can not remove a social note"); - - /***** Remove social post *****/ - if (SocNot.NoteType == Soc_NOTE_SOCIAL_POST) - { - sprintf (Query,"DELETE FROM social_posts WHERE PstCod='%ld'", - SocNot.Cod); - DB_QueryDELETE (Query,"can not remove a social post"); - } - } + /***** Delete social publishing from database *****/ + Soc_DeleteASocialPublishingFromDB (&SocPub,&SocNot); /***** Message of success *****/ Lay_ShowAlert (Lay_SUCCESS,Txt_Comment_removed); @@ -931,6 +1084,56 @@ void Soc_RemoveSocialPublishing (void) Soc_ShowFollowingTimeline (); } +/*****************************************************************************/ +/**************** Delete a social publishing from database *******************/ +/*****************************************************************************/ + +static void Soc_DeleteASocialPublishingFromDB (const struct SocialPublishing *SocPub, + const struct SocialNote *SocNot) + { + char Query[128]; + unsigned long NumPubs; + + /***** Remove social publishing *****/ + sprintf (Query,"DELETE FROM social_timeline WHERE PubCod='%ld'", + SocPub->PubCod); + DB_QueryDELETE (Query,"can not remove a social publishing"); + + /***** Count number of times this note + is published in timeline after removal *****/ + NumPubs = Soc_GetNumPubsOfANote (SocNot->NotCod); + + if (NumPubs == 0) // This was the last publishing of this note + { + /***** Remove social note *****/ + sprintf (Query,"DELETE FROM social_notes WHERE NotCod='%ld'", + SocNot->NotCod); + DB_QueryDELETE (Query,"can not remove a social note"); + + /***** Remove social post *****/ + if (SocNot->NoteType == Soc_NOTE_SOCIAL_POST) + { + sprintf (Query,"DELETE FROM social_posts WHERE PstCod='%ld'", + SocNot->Cod); + DB_QueryDELETE (Query,"can not remove a social post"); + } + } + } + +/*****************************************************************************/ +/***** Check if I have published a social note (I authored or shared it) *****/ +/*****************************************************************************/ + +static bool Soc_CheckIfNoteIsYetPublishedByMe (long NotCod) + { + char Query[128]; + + sprintf (Query,"SELECT COUNT(*) FROM social_timeline" + " WHERE NotCod='%ld' AND PublisherCod='%ld'", + NotCod,Gbl.Usrs.Me.UsrDat.UsrCod); + return (DB_QueryCOUNT (Query,"can not check if you have published a social note") != 0); + } + /*****************************************************************************/ /*********** Get number of publishings in timeline of a note code ************/ /*****************************************************************************/ diff --git a/swad_social.h b/swad_social.h index 7400d97d..9f93f319 100644 --- a/swad_social.h +++ b/swad_social.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -89,6 +89,9 @@ void Soc_StoreAndPublishSocialNote (Soc_NoteType_t NoteType,long Cod); void Soc_FormSocialPost (void); void Soc_ReceiveSocialPost (void); +void Soc_ShareSocialPublishing (void); +void Soc_UnshareSocialPublishing (void); + void Soc_RequestRemovalSocialNote (void); void Soc_RemoveSocialPublishing (void); diff --git a/swad_statistic.c b/swad_statistic.c index e4f7cba3..10424324 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_statistic.h b/swad_statistic.h index 12e88233..12a7de91 100644 --- a/swad_statistic.h +++ b/swad_statistic.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_string.c b/swad_string.c index ba1ef38b..69f2a61c 100644 --- a/swad_string.c +++ b/swad_string.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_string.h b/swad_string.h index 795b9ad0..5ef25891 100644 --- a/swad_string.h +++ b/swad_string.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_survey.c b/swad_survey.c index 2bcf975a..da364f7a 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_survey.h b/swad_survey.h index 0e65026b..84b411b6 100644 --- a/swad_survey.h +++ b/swad_survey.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_syllabus.c b/swad_syllabus.c index cc25d6cd..4520083c 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_syllabus.h b/swad_syllabus.h index be716617..f9c65756 100644 --- a/swad_syllabus.h +++ b/swad_syllabus.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_tab.c b/swad_tab.c index 0f7fceab..79f4570a 100644 --- a/swad_tab.c +++ b/swad_tab.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_tab.h b/swad_tab.h index cdfbb147..3fd915bf 100644 --- a/swad_tab.h +++ b/swad_tab.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_test.c b/swad_test.c index 79d76b5d..171bc822 100644 --- a/swad_test.c +++ b/swad_test.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -1284,11 +1284,12 @@ void Tst_RenameTag (void) /* Step 2: If the new tag existed for a question ==> delete old tag from tst_question_tags; the new tag will remain If the new tag did not exist for a question ==> change old tag to new tag in tst_question_tags */ - sprintf (Query,"DROP TABLE IF EXISTS tst_question_tags_tmp"); + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS tst_question_tags_tmp"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary table"); - sprintf (Query,"CREATE TEMPORARY TABLE tst_question_tags_tmp ENGINE=MEMORY SELECT QstCod FROM tst_question_tags WHERE TagCod='%ld'", + sprintf (Query,"CREATE TEMPORARY TABLE tst_question_tags_tmp ENGINE=MEMORY" + " SELECT QstCod FROM tst_question_tags WHERE TagCod='%ld'", ExistingNewTagCod); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not create temporary table"); @@ -1309,7 +1310,7 @@ void Tst_RenameTag (void) OldTagCod); DB_QueryUPDATE (Query,"can not update a tag in some questions"); - sprintf (Query,"DROP TABLE IF EXISTS tst_question_tags_tmp"); + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS tst_question_tags_tmp"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary table"); diff --git a/swad_test.h b/swad_test.h index bddcb4b1..8279e9ec 100644 --- a/swad_test.h +++ b/swad_test.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_test_import.c b/swad_test_import.c index 800389d9..33355f88 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_test_import.h b/swad_test_import.h index 6f71b438..2a93a7d1 100644 --- a/swad_test_import.h +++ b/swad_test_import.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_text.c b/swad_text.c index f66a708d..9db1127e 100644 --- a/swad_text.c +++ b/swad_text.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas Català translation: Antonio Cañas Vargas @@ -34616,6 +34616,48 @@ const char *Txt_SEX_SINGULAR_Abc[Usr_NUM_SEXS] = #endif }; +const char *Txt_Share = +#if L==1 + "Compartir"; +#elif L==2 + "Teilen"; +#elif L==3 + "Share"; +#elif L==4 + "Compartir"; +#elif L==5 + "Partager"; +#elif L==6 + "Compartir"; // Okoteve traducción +#elif L==7 + "Condividere"; +#elif L==8 + "Dzielić"; +#elif L==9 + "Compartilhar"; +#endif + +const char *Txt_Shared = +#if L==1 + "Compartit"; +#elif L==2 + "Geteilt"; +#elif L==3 + "Shared"; +#elif L==4 + "Compartido"; +#elif L==5 + "Partagé"; +#elif L==6 + "Compartido"; // Okoteve traducción +#elif L==7 + "Condiviso"; +#elif L==8 + "Dzielone"; +#elif L==9 + "Compartilhado"; +#endif + const char *Txt_Shared_files_area = #if L==1 "Zona d'arxius compartits"; @@ -46744,6 +46786,27 @@ const char *Txt_Unread_BR_msgs = "Não
lidas"; #endif +const char *Txt_Unshared = // No longer shared +#if L==1 + "No compartit"; +#elif L==2 + "Kein geteilt"; +#elif L==3 + "Unshared"; +#elif L==4 + "No compartido"; +#elif L==5 + "Non partagé"; +#elif L==6 + "No compartido"; // Okoteve traducción +#elif L==7 + "Non condiviso"; +#elif L==8 + "Niedzieloną"; +#elif L==9 + "Não compartilhado"; +#endif + const char *Txt_Update = #if L==1 "Actualitzar"; diff --git a/swad_text.h b/swad_text.h index 858cfe43..2f90cba7 100644 --- a/swad_text.h +++ b/swad_text.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_theme.c b/swad_theme.c index 8b9fe45e..21b8a188 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_theme.h b/swad_theme.h index 65374f3c..dc0a71be 100644 --- a/swad_theme.h +++ b/swad_theme.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_timetable.c b/swad_timetable.c index 1b1cfafc..572ce6d4 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_timetable.h b/swad_timetable.h index 9a088c5c..2a2c6f51 100644 --- a/swad_timetable.h +++ b/swad_timetable.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_user.c b/swad_user.c index a492887e..a0a42592 100644 --- a/swad_user.c +++ b/swad_user.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as @@ -764,7 +764,7 @@ unsigned Usr_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole, // The temporary table achieves speedup from ~2s to few ms /***** Remove temporary table if exists *****/ - sprintf (Query,"DROP TABLE IF EXISTS my_courses_tmp"); + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS my_courses_tmp"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary tables"); @@ -787,7 +787,7 @@ unsigned Usr_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole, NumUsrs = (unsigned) DB_QueryCOUNT (Query,"can not get the number of users"); /***** Remove temporary table *****/ - sprintf (Query,"DROP TABLE IF EXISTS my_courses_tmp"); + sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS my_courses_tmp"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary tables"); diff --git a/swad_user.h b/swad_user.h index ef39538b..225f0d5e 100644 --- a/swad_user.h +++ b/swad_user.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_web_service.c b/swad_web_service.c index 8e55e715..52477244 100644 --- a/swad_web_service.c +++ b/swad_web_service.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_web_service.h b/swad_web_service.h index ce13252c..bdca09d4 100644 --- a/swad_web_service.h +++ b/swad_web_service.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_xml.c b/swad_xml.c index fab07cac..cac30aed 100644 --- a/swad_xml.c +++ b/swad_xml.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_xml.h b/swad_xml.h index b6151806..de64aabb 100644 --- a/swad_xml.h +++ b/swad_xml.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/swad_zip.c b/swad_zip.c index 97dbdda6..f8e8da13 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -6,7 +6,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General 3 License as diff --git a/swad_zip.h b/swad_zip.h index 6b71c7a3..a7eff393 100644 --- a/swad_zip.h +++ b/swad_zip.h @@ -8,7 +8,7 @@ and used to support university teaching. This file is part of SWAD core. - Copyright (C) 1999-2015 Antonio Cañas Vargas + Copyright (C) 1999-2016 Antonio Cañas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as