mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-14 12:44:09 +02:00
Version 16.185.2
This commit is contained in:
parent
0aaddb086a
commit
43710dda36
|
@ -214,13 +214,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.185.1 (2017-04-19)"
|
#define Log_PLATFORM_VERSION "SWAD 16.185.2 (2017-04-19)"
|
||||||
#define CSS_FILE "swad16.184.css"
|
#define CSS_FILE "swad16.184.css"
|
||||||
#define JS_FILE "swad16.181.js"
|
#define JS_FILE "swad16.181.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.185.2: Apr 19, 2017 Changes in forums. (217793 lines)
|
||||||
Version 16.185.1: Apr 19, 2017 Changes in forums.
|
Version 16.185.1: Apr 19, 2017 Changes in forums.
|
||||||
New help URLs for forums. (217793 lines)
|
New help URLs for forums. (217793 lines)
|
||||||
Version 16.185: Apr 19, 2017 Code refactoring in forums. (217708 lines)
|
Version 16.185: Apr 19, 2017 Code refactoring in forums. (217708 lines)
|
||||||
|
|
60
swad_forum.c
60
swad_forum.c
|
@ -300,6 +300,7 @@ static time_t For_GetThrReadTime (long ThrCod);
|
||||||
static void For_DeleteThrFromReadThrs (long ThrCod);
|
static void For_DeleteThrFromReadThrs (long ThrCod);
|
||||||
static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Message);
|
static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Message);
|
||||||
static void For_PutIconNewPost (void);
|
static void For_PutIconNewPost (void);
|
||||||
|
static void For_PutAllHiddenParamsNewPost (void);
|
||||||
|
|
||||||
static void For_ShowAForumPost (unsigned PstNum,long PstCod,
|
static void For_ShowAForumPost (unsigned PstNum,long PstCod,
|
||||||
bool LastPst,char LastSubject[Cns_MAX_BYTES_SUBJECT + 1],
|
bool LastPst,char LastSubject[Cns_MAX_BYTES_SUBJECT + 1],
|
||||||
|
@ -310,7 +311,6 @@ static void For_GetPstData (long PstCod,long *UsrCod,time_t *CreatTimeUTC,
|
||||||
struct Image *Image);
|
struct Image *Image);
|
||||||
static void For_WriteNumberOfPosts (long UsrCod);
|
static void For_WriteNumberOfPosts (long UsrCod);
|
||||||
|
|
||||||
static void For_PutAllHiddenParamsSelectedForum (void);
|
|
||||||
static void For_PutParamForumSet (For_ForumSet_t ForumSet);
|
static void For_PutParamForumSet (For_ForumSet_t ForumSet);
|
||||||
static void For_PutParamForumOrder (For_Order_t Order);
|
static void For_PutParamForumOrder (For_Order_t Order);
|
||||||
static void For_PutParamForumLocation (long Location);
|
static void For_PutParamForumLocation (long Location);
|
||||||
|
@ -348,6 +348,7 @@ static void For_WriteNumberOfThrs (unsigned NumThrs,unsigned NumThrsWithNewPosts
|
||||||
static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
||||||
Lay_AlertType_t AlertType,const char *Message);
|
Lay_AlertType_t AlertType,const char *Message);
|
||||||
static void For_PutIconNewThread (void);
|
static void For_PutIconNewThread (void);
|
||||||
|
static void For_PutAllHiddenParamsNewThread (void);
|
||||||
static unsigned For_GetNumThrsInForum (struct Forum *Forum);
|
static unsigned For_GetNumThrsInForum (struct Forum *Forum);
|
||||||
static unsigned For_GetNumPstsInForum (struct Forum *Forum);
|
static unsigned For_GetNumPstsInForum (struct Forum *Forum);
|
||||||
static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
||||||
|
@ -1145,12 +1146,23 @@ static void For_PutIconNewPost (void)
|
||||||
extern const char *Txt_New_post;
|
extern const char *Txt_New_post;
|
||||||
|
|
||||||
Lay_PutContextualLink (For_ActionsSeePstFor[Gbl.Forum.ForumSelected.Type],
|
Lay_PutContextualLink (For_ActionsSeePstFor[Gbl.Forum.ForumSelected.Type],
|
||||||
For_ID_NEW_POST_SECTION,For_PutAllHiddenParamsSelectedForum,
|
For_ID_NEW_POST_SECTION,For_PutAllHiddenParamsNewPost,
|
||||||
"plus64x64.png",
|
"plus64x64.png",
|
||||||
Txt_New_post,NULL,
|
Txt_New_post,NULL,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void For_PutAllHiddenParamsNewPost (void)
|
||||||
|
{
|
||||||
|
For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current
|
||||||
|
UINT_MAX, // Page of posts = last
|
||||||
|
Gbl.Forum.ForumSet,
|
||||||
|
Gbl.Forum.ThreadsOrder,
|
||||||
|
Gbl.Forum.ForumSelected.Location,
|
||||||
|
Gbl.Forum.ForumSelected.ThrCod,
|
||||||
|
-1L);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************************** Show a post from forum *************************/
|
/**************************** Show a post from forum *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1495,17 +1507,6 @@ static void For_WriteNumberOfPosts (long UsrCod)
|
||||||
/************ Put all the hidden parameters related to forums ****************/
|
/************ Put all the hidden parameters related to forums ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void For_PutAllHiddenParamsSelectedForum (void)
|
|
||||||
{
|
|
||||||
For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current
|
|
||||||
Gbl.Forum.CurrentPagePsts, // Page of posts = current
|
|
||||||
Gbl.Forum.ForumSet,
|
|
||||||
Gbl.Forum.ThreadsOrder,
|
|
||||||
Gbl.Forum.ForumSelected.Location,
|
|
||||||
Gbl.Forum.ForumSelected.ThrCod,
|
|
||||||
-1L);
|
|
||||||
}
|
|
||||||
|
|
||||||
void For_PutAllHiddenParamsForum (unsigned NumPageThreads,
|
void For_PutAllHiddenParamsForum (unsigned NumPageThreads,
|
||||||
unsigned NumPagePosts,
|
unsigned NumPagePosts,
|
||||||
For_ForumSet_t ForumSet,
|
For_ForumSet_t ForumSet,
|
||||||
|
@ -2650,12 +2651,23 @@ static void For_PutIconNewThread (void)
|
||||||
extern const char *Txt_New_thread;
|
extern const char *Txt_New_thread;
|
||||||
|
|
||||||
Lay_PutContextualLink (For_ActionsSeeFor[Gbl.Forum.ForumSelected.Type],
|
Lay_PutContextualLink (For_ActionsSeeFor[Gbl.Forum.ForumSelected.Type],
|
||||||
For_ID_NEW_THREAD_SECTION,For_PutAllHiddenParamsSelectedForum,
|
For_ID_NEW_THREAD_SECTION,For_PutAllHiddenParamsNewThread,
|
||||||
"plus64x64.png",
|
"plus64x64.png",
|
||||||
Txt_New_thread,NULL,
|
Txt_New_thread,NULL,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void For_PutAllHiddenParamsNewThread (void)
|
||||||
|
{
|
||||||
|
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||||
|
1, // Page of posts = first
|
||||||
|
Gbl.Forum.ForumSet,
|
||||||
|
Gbl.Forum.ThreadsOrder,
|
||||||
|
Gbl.Forum.ForumSelected.Location,
|
||||||
|
-1L,
|
||||||
|
-1L);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Get number of forums of a type ***********************/
|
/********************** Get number of forums of a type ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3813,29 +3825,17 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
|
||||||
Hlp_SOCIAL_Forums_new_thread);
|
Hlp_SOCIAL_Forums_new_thread);
|
||||||
|
|
||||||
/***** Start form *****/
|
/***** Start form *****/
|
||||||
if (IsReply) // Form to write a reply to a message of an existing thread
|
if (IsReply) // Form to write a reply to a post of an existing thread
|
||||||
{
|
{
|
||||||
Act_FormStartAnchor (For_ActionsRecRepFor[Gbl.Forum.ForumSelected.Type],
|
Act_FormStartAnchor (For_ActionsRecRepFor[Gbl.Forum.ForumSelected.Type],
|
||||||
For_ID_FORUM_POSTS_SECTION);
|
For_ID_FORUM_POSTS_SECTION);
|
||||||
For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current
|
For_PutAllHiddenParamsNewPost ();
|
||||||
UINT_MAX, // Page of posts = last
|
|
||||||
Gbl.Forum.ForumSet,
|
|
||||||
Gbl.Forum.ThreadsOrder,
|
|
||||||
Gbl.Forum.ForumSelected.Location,
|
|
||||||
Gbl.Forum.ForumSelected.ThrCod,
|
|
||||||
-1L);
|
|
||||||
}
|
}
|
||||||
else // Form to write the first message of a new thread
|
else // Form to write the first post of a new thread
|
||||||
{
|
{
|
||||||
Act_FormStartAnchor (For_ActionsRecThrFor[Gbl.Forum.ForumSelected.Type],
|
Act_FormStartAnchor (For_ActionsRecThrFor[Gbl.Forum.ForumSelected.Type],
|
||||||
For_ID_FORUM_POSTS_SECTION);
|
For_ID_FORUM_POSTS_SECTION);
|
||||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
For_PutAllHiddenParamsNewThread ();
|
||||||
1, // Page of posts = first
|
|
||||||
Gbl.Forum.ForumSet,
|
|
||||||
Gbl.Forum.ThreadsOrder,
|
|
||||||
Gbl.Forum.ForumSelected.Location,
|
|
||||||
-1L,
|
|
||||||
-1L);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Subject and content *****/
|
/***** Subject and content *****/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user