mirror of https://github.com/acanas/swad-core.git
Version 16.156
This commit is contained in:
parent
e299f48a90
commit
20e0683453
|
@ -209,13 +209,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.155.35 (2017-03-15)"
|
#define Log_PLATFORM_VERSION "SWAD 16.156 (2017-03-15)"
|
||||||
#define CSS_FILE "swad16.147.css"
|
#define CSS_FILE "swad16.147.css"
|
||||||
#define JS_FILE "swad16.144.js"
|
#define JS_FILE "swad16.144.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.156: Mar 15, 2017 Fixed bug in messages, reported by Francisco Ocaña Lara. (217063 lines)
|
||||||
Version 16.155.35:Mar 15, 2017 Some help URLs translated to spanish. (217047 lines)
|
Version 16.155.35:Mar 15, 2017 Some help URLs translated to spanish. (217047 lines)
|
||||||
Version 16.155.34:Mar 15, 2017 Changes in keywords. (217046 lines)
|
Version 16.155.34:Mar 15, 2017 Changes in keywords. (217046 lines)
|
||||||
Version 16.155.33:Mar 14, 2017 Some help URLs translated to spanish. (217042 lines)
|
Version 16.155.33:Mar 14, 2017 Some help URLs translated to spanish. (217042 lines)
|
||||||
|
|
|
@ -158,6 +158,7 @@ void Msg_FormMsgUsrs (void)
|
||||||
Par_GetParAndChangeFormat ("HiddenContent",Content,Cns_MAX_BYTES_LONG_TEXT,
|
Par_GetParAndChangeFormat ("HiddenContent",Content,Cns_MAX_BYTES_LONG_TEXT,
|
||||||
Str_TO_TEXT,false);
|
Str_TO_TEXT,false);
|
||||||
|
|
||||||
|
/***** Show a form to compose a message to users *****/
|
||||||
Msg_PutFormMsgUsrs (Content);
|
Msg_PutFormMsgUsrs (Content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +199,6 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
|
||||||
GetUsrsInCrs = !Gbl.Msg.ShowOnlyOneRecipient && // Show list of potential recipients
|
GetUsrsInCrs = !Gbl.Msg.ShowOnlyOneRecipient && // Show list of potential recipients
|
||||||
(Gbl.Usrs.Me.IBelongToCurrentCrs || // If there is a course selected and I belong to it
|
(Gbl.Usrs.Me.IBelongToCurrentCrs || // If there is a course selected and I belong to it
|
||||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
||||||
|
|
||||||
if (GetUsrsInCrs)
|
if (GetUsrsInCrs)
|
||||||
{
|
{
|
||||||
/***** Get and update type of list,
|
/***** Get and update type of list,
|
||||||
|
|
|
@ -347,6 +347,8 @@ bool Ses_GetSessionData (void)
|
||||||
void Ses_InsertHiddenParInDB (Act_Action_t Action,const char *ParamName,const char *ParamValue)
|
void Ses_InsertHiddenParInDB (Act_Action_t Action,const char *ParamName,const char *ParamValue)
|
||||||
{
|
{
|
||||||
char *Query;
|
char *Query;
|
||||||
|
size_t LengthParamName;
|
||||||
|
size_t LengthParamValue;
|
||||||
size_t MaxLength;
|
size_t MaxLength;
|
||||||
|
|
||||||
/***** Before of inserting the first hidden parameter passed to the next action,
|
/***** Before of inserting the first hidden parameter passed to the next action,
|
||||||
|
@ -354,25 +356,37 @@ void Ses_InsertHiddenParInDB (Act_Action_t Action,const char *ParamName,const ch
|
||||||
Ses_RemoveHiddenParFromThisSession ();
|
Ses_RemoveHiddenParFromThisSession ();
|
||||||
|
|
||||||
/***** For a unique session-action-parameter, don't insert a parameter more than one time *****/
|
/***** For a unique session-action-parameter, don't insert a parameter more than one time *****/
|
||||||
if (!Ses_CheckIfHiddenParIsAlreadyInDB (Action,ParamName))
|
if (ParamName)
|
||||||
{
|
if ((LengthParamName = strlen (ParamName)))
|
||||||
/***** Allocate space for query *****/
|
if (!Ses_CheckIfHiddenParIsAlreadyInDB (Action,ParamName))
|
||||||
MaxLength = 256 + Ses_BYTES_SESSION_ID + strlen (ParamName) + strlen (ParamValue);
|
{
|
||||||
if ((Query = (char *) malloc (MaxLength + 1)) == NULL)
|
/***** Allocate space for query *****/
|
||||||
Lay_ShowErrorAndExit ("Not enough memory for query.");
|
if (ParamValue)
|
||||||
|
LengthParamValue = strlen (ParamValue);
|
||||||
|
else
|
||||||
|
LengthParamValue = 0;
|
||||||
|
MaxLength = 256 +
|
||||||
|
Ses_BYTES_SESSION_ID +
|
||||||
|
LengthParamName +
|
||||||
|
LengthParamValue;
|
||||||
|
if ((Query = (char *) malloc (MaxLength + 1)) == NULL)
|
||||||
|
Lay_ShowErrorAndExit ("Not enough memory for query.");
|
||||||
|
|
||||||
/***** Insert parameter in the database *****/
|
/***** Insert parameter in the database *****/
|
||||||
sprintf (Query,"INSERT INTO hidden_params"
|
sprintf (Query,"INSERT INTO hidden_params"
|
||||||
" (SessionId,Action,ParamName,ParamValue)"
|
" (SessionId,Action,ParamName,ParamValue)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" ('%s','%d','%s','%s')",
|
" ('%s','%d','%s','%s')",
|
||||||
Gbl.Session.Id,(int) Action,ParamName,ParamValue);
|
Gbl.Session.Id,(int) Action,
|
||||||
DB_QueryINSERT (Query,"can not create hidden parameter");
|
ParamName,
|
||||||
Gbl.HiddenParamsInsertedIntoDB = true;
|
LengthParamValue ? ParamValue :
|
||||||
|
"");
|
||||||
|
DB_QueryINSERT (Query,"can not create hidden parameter");
|
||||||
|
Gbl.HiddenParamsInsertedIntoDB = true;
|
||||||
|
|
||||||
/***** Free query *****/
|
/***** Free query *****/
|
||||||
free ((void *) Query);
|
free ((void *) Query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue