Version 15.192.3

This commit is contained in:
Antonio Cañas Vargas 2016-04-11 02:16:27 +02:00
parent 36c4ad4d9a
commit ae0b97aa96
4 changed files with 40 additions and 26 deletions

View File

@ -2409,31 +2409,31 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActSeePstForSWAUsr*/{ 244,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_ShowThrPsts ,NULL},
/* ActSeePstForSWATch*/{ 246,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_ShowThrPsts ,NULL},
/* ActRcvThrForCrsUsr*/{ 350,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCrsTch*/{ 754,-1,TabSoc,ActSeeFor ,0x114,0x114,0x114,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForDegUsr*/{ 252,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForDegTch*/{ 247,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCtrUsr*/{ 903,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCtrTch*/{ 904,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForInsUsr*/{ 737,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForInsTch*/{ 769,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForGenUsr*/{ 736,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForGenTch*/{ 765,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForSWAUsr*/{ 258,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForSWATch*/{ 259,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCrsUsr*/{ 350,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCrsTch*/{ 754,-1,TabSoc,ActSeeFor ,0x114,0x114,0x114,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForDegUsr*/{ 252,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForDegTch*/{ 247,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCtrUsr*/{ 903,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForCtrTch*/{ 904,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForInsUsr*/{ 737,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForInsTch*/{ 769,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForGenUsr*/{ 736,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForGenTch*/{ 765,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForSWAUsr*/{ 258,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvThrForSWATch*/{ 259,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCrsUsr*/{ 599,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCrsTch*/{ 755,-1,TabSoc,ActSeeFor ,0x114,0x114,0x114,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForDegUsr*/{ 606,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForDegTch*/{ 617,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCtrUsr*/{ 905,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCtrTch*/{ 906,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForInsUsr*/{ 740,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForInsTch*/{ 770,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForGenUsr*/{ 747,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForGenTch*/{ 816,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForSWAUsr*/{ 603,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForSWATch*/{ 622,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCrsUsr*/{ 599,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCrsTch*/{ 755,-1,TabSoc,ActSeeFor ,0x114,0x114,0x114,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForDegUsr*/{ 606,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForDegTch*/{ 617,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCtrUsr*/{ 905,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForCtrTch*/{ 906,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForInsUsr*/{ 740,-1,TabSoc,ActSeeFor ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForInsTch*/{ 770,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForGenUsr*/{ 747,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForGenTch*/{ 816,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForSWAUsr*/{ 603,-1,TabSoc,ActSeeFor ,0x1FE,0x1FE,0x1FE,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActRcvRepForSWATch*/{ 622,-1,TabSoc,ActSeeFor ,0x1F4,0x1F4,0x1F4,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,For_RecForumPst ,NULL},
/* ActReqDelThrCrsUsr*/{ 867,-1,TabSoc,ActSeeFor ,0x114,0x114,0x114,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_ReqDelThr ,NULL},
/* ActReqDelThrCrsTch*/{ 869,-1,TabSoc,ActSeeFor ,0x114,0x114,0x114,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,For_ReqDelThr ,NULL},
@ -2556,7 +2556,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActSeeNewNtf */{ 991,-1,TabMsg,ActSeeNtf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ntf_ShowMyNotifications ,NULL},
/* ActMrkNtfSee */{1146,-1,TabMsg,ActSeeNtf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ntf_MarkAllNotifAsSeen ,NULL},
/* ActRcvMsgUsr */{ 27,-1,TabMsg,ActReqMsgUsr ,0x1FC,0x1FC,0x1FC,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Msg_RecMsgFromUsr ,NULL},
/* ActRcvMsgUsr */{ 27,-1,TabMsg,ActReqMsgUsr ,0x1FC,0x1FC,0x1FC,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,Msg_RecMsgFromUsr ,NULL},
/* ActReqDelAllSntMsg*/{ 604,-1,TabMsg,ActSeeSntMsg ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Msg_ReqDelAllSntMsgs ,NULL},
/* ActReqDelAllRcvMsg*/{ 593,-1,TabMsg,ActSeeRcvMsg ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Msg_ReqDelAllRecMsgs ,NULL},
/* ActDelAllSntMsg */{ 434,-1,TabMsg,ActSeeSntMsg ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Msg_DelAllSntMsgs ,NULL},

View File

@ -133,13 +133,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.192.2 (2016-04-11)"
#define Log_PLATFORM_VERSION "SWAD 15.192.3 (2016-04-11)"
#define CSS_FILE "swad15.192.css"
#define JS_FILE "swad15.190.1.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.192.3: Apr 11, 2016 Fixed bugs when receiving forum image. (199355 lines)
Version 15.192.2: Apr 11, 2016 Fixed bug when getting forum post content. (199344 lines)
Version 15.192.1: Apr 10, 2016 Remove image attached to forum post when the post is removed. (199340 lines)
Version 15.192: Apr 10, 2016 Get image attached to forum post / message. (199332 lines)

View File

@ -457,6 +457,12 @@ static long For_InsertForumPst (long ThrCod,long UsrCod,
Img_MAX_BYTES_TITLE)) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store database query.");
/***** Check if image is received and processed *****/
if (Image->Action == Img_ACTION_NEW_IMAGE && // Upload new image
Image->Status == Img_FILE_PROCESSED) // The new image received has been processed
/* Move processed image to definitive directory */
Img_MoveImageToDefinitiveDirectory (Image);
/***** Insert forum post in the database *****/
sprintf (Query,"INSERT INTO forum_post"
" (ThrCod,UsrCod,CreatTime,ModifTime,NumNotif,"
@ -1161,6 +1167,7 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
/***** Get data of post *****/
For_GetPstData (PstCod,&UsrDat.UsrCod,&CreatTimeUTC,
Subject,OriginalContent,&Image);
if (Enabled)
{
/* Return this subject as last subject */

View File

@ -1371,6 +1371,12 @@ static long Msg_InsertNewMsg (const char *Subject,const char *Content,
Img_MAX_BYTES_TITLE)) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store database query.");
/***** Check if image is received and processed *****/
if (Image->Action == Img_ACTION_NEW_IMAGE && // Upload new image
Image->Status == Img_FILE_PROCESSED) // The new image received has been processed
/* Move processed image to definitive directory */
Img_MoveImageToDefinitiveDirectory (Image);
/***** Insert message subject and content in the database *****/
sprintf (Query,"INSERT INTO msg_content"
" (Subject,Content,ImageName,ImageTitle)"