Version 15.82.2

This commit is contained in:
Antonio Cañas Vargas 2015-12-30 00:41:55 +01:00
parent 9bb1b6d63e
commit edb9bd2feb
2 changed files with 19 additions and 11 deletions

View File

@ -116,13 +116,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.82.1 (2015-12-29)"
#define Log_PLATFORM_VERSION "SWAD 15.82.2 (2015-12-30)"
#define CSS_FILE "swad15.80.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.82.2: Dec 30, 2015 Current timeline is displayed below the form to write a new social post. (189183 lines)
Version 15.82.1: Dec 29, 2015 Public social posts are displayed in timeline. (189176 lines)
Version 15.82: Dec 29, 2015 Public social post is received and stored in a new database table. (189136 lines)
1 change necessary in database:

View File

@ -116,7 +116,6 @@ static void Soc_StartFormGoToAction (Soc_SocialEvent_t SocialEvent,
static void Soc_GetEventSummary (Soc_SocialEvent_t SocialEvent,long Cod,
char *SummaryStr,unsigned MaxChars);
/*****************************************************************************/
/****************** Form to write a new public comment ***********************/
/*****************************************************************************/
@ -126,24 +125,28 @@ void Soc_FormSocialPost (void)
extern const char *Txt_New_comment;
extern const char *Txt_Send_comment;
/***** Start frame *****/
/***** Form to write a new public comment *****/
/* Start frame */
Lay_StartRoundFrame ("560px",Txt_New_comment);
/***** Start form to write the post *****/
/* Start form to write the post */
Act_FormStart (ActRcvSocPst);
/***** Content of new post *****/
/* Content of new post */
fprintf (Gbl.F.Out,"<textarea name=\"Content\" cols=\"50\" rows=\"10\">"
"</textarea>");
/***** Send button *****/
/* Send button */
Lay_PutCreateButton (Txt_Send_comment);
/***** End form *****/
/* End form */
Act_FormEnd ();
/***** End frame *****/
/* End frame */
Lay_EndRoundFrame ();
/***** Write current timeline *****/
Soc_ShowFollowingTimeline ();
}
/*****************************************************************************/
@ -156,17 +159,21 @@ void Soc_ReceiveSocialPost (void)
char Query[128+Cns_MAX_BYTES_LONG_TEXT];
long PstCod;
/***** Get the content of the post *****/
/***** Get and store new post *****/
/* Get the content of the post */
Par_GetParAndChangeFormat ("Content",Content,Cns_MAX_BYTES_LONG_TEXT,
Str_TO_RIGOROUS_HTML,false);
/***** Insert post content in the database *****/
/* Insert post content in the database */
sprintf (Query,"INSERT INTO social_post (Content) VALUES ('%s')",
Content);
PstCod = DB_QueryINSERTandReturnCode (Query,"can not create post");
/***** Insert post in social events *****/
/* Insert post in social events */
Soc_StoreSocialEvent (Soc_EVENT_SOCIAL_POST,PstCod);
/***** Write current timeline *****/
Soc_ShowFollowingTimeline ();
}
/*****************************************************************************/