From 8a44216c7cabd93b51a91b0f63e3bf022b405f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 3 Jan 2016 19:45:15 +0100 Subject: [PATCH] Version 15.93.7 --- swad_changelog.h | 10 +++++----- swad_forum.c | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 1ee8b7ad9..ac3657288 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -110,23 +110,23 @@ // TODO: Fix bug at the end of ranking (number too low) when a course is selected // TODO: Reply to all // TODO: Hour in exam announcement should start at six a.m. -// TODO: When a file, notice, etc. is removed, it should be removed from social events? // TODO: Change "Actividad pública" to "Actividad de Antonio" in user's profile -// TODO: Put parameter FilCod instead of Path to go to a file in Notifications and Social? +// TODO: Forums For_FORUM_GLOBAL_USRS and For_FORUM_SWAD_USRS should be available for guests for coherence with social timeline? /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.93.6 (2016-01-03)" +#define Log_PLATFORM_VERSION "SWAD 15.93.7 (2016-01-03)" #define CSS_FILE "swad15.88.1.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.93.6: Jan 03, 2016 Social notes are marked as unavailable when a exam announcement is removed. (190409 lines) - Version 15.93.5: Jan 03, 2016 Social notes are marked as unavailable when a notice is removed. (190406 lines) + Version 15.93.7: Jan 03, 2016 Social note is marked as unavailable when a forum post is removed. (190419 lines) + Version 15.93.6: Jan 03, 2016 Social note is marked as unavailable when a exam announcement is removed. (190409 lines) + Version 15.93.5: Jan 03, 2016 Social note is marked as unavailable when a notice is removed. (190406 lines) 6 changes necessary in database: CREATE UNIQUE INDEX NotCod ON social_notes (NotCod); DROP INDEX SocCod ON social_notes; diff --git a/swad_forum.c b/swad_forum.c index 17a649599..32e92bb43 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -3907,6 +3907,17 @@ void For_DelPst (void) Ntf_SetNotifAsRemoved (Ntf_EVENT_FORUM_POST_COURSE,PstCod); Ntf_SetNotifAsRemoved (Ntf_EVENT_FORUM_REPLY,PstCod); + /***** Mark possible social note as unavailable *****/ + switch (Gbl.Forum.ForumType) // Only if forum is public for any logged user + { + case For_FORUM_GLOBAL_USRS: + case For_FORUM_SWAD_USRS: + Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NOTE_FORUM_POST,PstCod); + break; + default: + break; + } + if (ThreadDeleted) { Lay_ShowAlert (Lay_SUCCESS,Txt_Post_and_thread_removed);