mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 22:35:28 +02:00
Version 16.155.12
This commit is contained in:
parent
20e22eb3b4
commit
9de3b7d774
|
@ -207,14 +207,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.155.11 (2017-03-11)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.155.12 (2017-03-12)"
|
||||
#define CSS_FILE "swad16.147.css"
|
||||
#define JS_FILE "swad16.144.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 16.155.11:Mar 11, 2017 Adjusting size of database fields. (? lines)
|
||||
Version 16.155.12:Mar 12, 2017 Fixed bug while sending a message to several users, reported by Javier Fernández Baldomero. (216721 lines)
|
||||
Version 16.155.11:Mar 11, 2017 Adjusting size of database fields. (216711 lines)
|
||||
1 change necessary in database:
|
||||
ALTER TABLE forum_post CHANGE COLUMN ImageTitle ImageTitle VARCHAR(2047) NOT NULL;
|
||||
|
||||
|
|
|
@ -718,7 +718,6 @@ void Msg_RecMsgFromUsr (void)
|
|||
Content,Cns_MAX_BYTES_LONG_TEXT,false);
|
||||
Ptr = Gbl.Usrs.Select.All;
|
||||
NumRecipients = 0;
|
||||
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDstData.EncryptedUsrCod,Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
|
|
29
swad_user.c
29
swad_user.c
|
@ -5248,7 +5248,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
ListUsrCods.NumUsrs = 1;
|
||||
Usr_AllocateListUsrCods (&ListUsrCods);
|
||||
ListUsrCods.Lst[0] = Gbl.Usrs.Other.UsrDat.UsrCod;
|
||||
ListUsrCods.Lst[0] = UsrDat.UsrCod;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5339,23 +5339,34 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
/* Find if encrypted user's code is already in list */
|
||||
if (!Usr_FindUsrCodInListOfSelectedUsrs (UsrDat.EncryptedUsrCod)) // If not in list ==> add it
|
||||
{
|
||||
LengthUsrCod = strlen (UsrDat.EncryptedUsrCod);
|
||||
|
||||
/* Add encrypted user's code to list of users */
|
||||
if (LengthSelectedUsrsCods == 0) // First user in list
|
||||
{
|
||||
if (strlen (UsrDat.EncryptedUsrCod) < Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
Str_Copy (Gbl.Usrs.Select.All,UsrDat.EncryptedUsrCod,
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS); // Add first user
|
||||
if (LengthUsrCod < Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
{
|
||||
/* Add user */
|
||||
Str_Copy (Gbl.Usrs.Select.All,
|
||||
UsrDat.EncryptedUsrCod,
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
LengthSelectedUsrsCods = LengthUsrCod;
|
||||
}
|
||||
}
|
||||
else // Not first user in list
|
||||
{
|
||||
LengthUsrCod = strlen (UsrDat.EncryptedUsrCod);
|
||||
if (LengthSelectedUsrsCods + (1 + LengthUsrCod) < Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
if (LengthSelectedUsrsCods + (1 + LengthUsrCod) <
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
{
|
||||
// Add another user
|
||||
/* Add separator */
|
||||
Gbl.Usrs.Select.All[LengthSelectedUsrsCods] = Par_SEPARATOR_PARAM_MULTIPLE;
|
||||
Str_Concat (Gbl.Usrs.Select.All,UsrDat.EncryptedUsrCod,
|
||||
LengthSelectedUsrsCods++;
|
||||
|
||||
/* Add user */
|
||||
Str_Copy (Gbl.Usrs.Select.All + LengthSelectedUsrsCods,
|
||||
UsrDat.EncryptedUsrCod,
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
LengthSelectedUsrsCods += 1 + LengthUsrCod;
|
||||
LengthSelectedUsrsCods += LengthUsrCod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user