From aeb6cb7a77492fa07addd0d5c1821729977d9370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 28 Dec 2014 17:00:11 +0100 Subject: [PATCH] Version 14.46.1 --- swad_changelog.h | 3 ++- swad_forum.c | 10 ++++++---- swad_forum.h | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 42109491d..974d8d66b 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -35,11 +35,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.46 (2014/12/28)" +#define Log_PLATFORM_VERSION "SWAD 14.46.1 (2014/12/28)" // 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 | tail -1 /* + Version 14.46.1 :Dic 28, 2014 Changes in listing of forums. (174342 lines) Version 14.46 :Dic 28, 2014 Course syllabus are shown in one unique option. (174340 lines) 1 change necessary in database: INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1242','es','N','Ver programa'); diff --git a/swad_forum.c b/swad_forum.c index 49b8a2560..0a793f70e 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -259,6 +259,7 @@ static unsigned For_GetNumOfUnreadPostsInThr (long ThrCod,unsigned NumPostsInThr static unsigned For_GetNumOfPostsInThrNewerThan (long ThrCod,const char *Time); static void For_UpdateNumUsrsNotifiedByEMailAboutPost (long PstCod,unsigned NumUsrsToBeNotifiedByEMail); static void For_WriteNumberOfThrs (unsigned NumThrs,unsigned NumThrsWithNewPosts); +static void For_WriteNumThrsAndPsts (unsigned NumThrs,unsigned NumThrsWithNewPosts,unsigned NumPosts); static long For_GetParamThrCod (void); static void For_PutHiddenParamPstCod (long PstCod); static long For_GetParamPstCod (void); @@ -2122,11 +2123,12 @@ static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct /***** Write total number of threads and posts in this forum *****/ if (ShowNumOfPosts) { - NumPosts = For_GetNumPstsInForum (ForumType); - For_WriteNumThrsAndPsts (NumThrs,NumThrsWithNewPosts,NumPosts); + if ((NumPosts = For_GetNumPstsInForum (ForumType))) + For_WriteNumThrsAndPsts (NumThrs,NumThrsWithNewPosts,NumPosts); } else - For_WriteNumberOfThrs (NumThrs,NumThrsWithNewPosts); + if (NumThrs) + For_WriteNumberOfThrs (NumThrs,NumThrsWithNewPosts); fprintf (Gbl.F.Out,"" "" @@ -2486,7 +2488,7 @@ static void For_WriteNumberOfThrs (unsigned NumThrs,unsigned NumThrsWithNewPosts /*************** Get and write total number of threads and posts *************/ /*****************************************************************************/ -void For_WriteNumThrsAndPsts (unsigned NumThrs,unsigned NumThrsWithNewPosts,unsigned NumPosts) +static void For_WriteNumThrsAndPsts (unsigned NumThrs,unsigned NumThrsWithNewPosts,unsigned NumPosts) { extern const char *Txt_thread; extern const char *Txt_threads; diff --git a/swad_forum.h b/swad_forum.h index 962d83670..e6e7f7d9e 100644 --- a/swad_forum.h +++ b/swad_forum.h @@ -129,7 +129,6 @@ void For_SetForumName (For_ForumType_t ForumType, char *ForumName,Txt_Language_t Language,bool UseHTMLEntities); unsigned For_GetNumThrsWithNewPstsInForum (For_ForumType_t ForumType,unsigned NumThreads); void For_ShowForumThrs (void); -void For_WriteNumThrsAndPsts (unsigned NumThrs,unsigned NumThrsWithNewPosts,unsigned NumPosts); unsigned For_GetNumTotalForumsOfType (For_ForumType_t ForumType, long InsCod,long CtrCod,long DegCod,long CrsCod); unsigned For_GetNumTotalThrsInForumsOfType (For_ForumType_t ForumType,