From e8ad901e78c3ef7fc8f91f1cee6969747021c18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 11 Nov 2019 11:20:31 +0100 Subject: [PATCH] Version19.63.1 --- swad_action.c | 1 - swad_changelog.h | 3 ++- swad_file.c | 2 +- swad_file_browser.c | 2 +- swad_global.c | 2 +- swad_group.c | 23 ++++++++++------------- swad_help.c | 2 -- swad_layout.c | 2 +- 8 files changed, 16 insertions(+), 21 deletions(-) diff --git a/swad_action.c b/swad_action.c index 2bc10a80..311a8db3 100644 --- a/swad_action.c +++ b/swad_action.c @@ -27,7 +27,6 @@ #include // For NULL #include // For fprintf -#include // For malloc and free #include // For string functions #include "swad_account.h" diff --git a/swad_changelog.h b/swad_changelog.h index 3d8bbde8..ccf3f803 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.63 (2019-11-11)" +#define Log_PLATFORM_VERSION "SWAD 19.63.1 (2019-11-11)" #define CSS_FILE "swad19.47.css" #define JS_FILE "swad19.39.js" /* @@ -496,6 +496,7 @@ ps2pdf source.ps destination.pdf // TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia) // TODO: Code refactoring in HTML h1, title, meta, video, p, iframe, input hidden, area + Version 19.63.1: Nov 11, 2019 Fixed bug in lists, reported by Javier Fernández Baldomero. (246381 lines) Version 19.63: Nov 11, 2019 Code refactoring in HTML. (246384 lines) Version 19.62: Nov 11, 2019 Code refactoring in HTML. Floats converted to doubles. (? lines) diff --git a/swad_file.c b/swad_file.c index 455cc194..1a3d919a 100644 --- a/swad_file.c +++ b/swad_file.c @@ -31,7 +31,7 @@ #include // For PATH_MAX #include // For NULL #include // For FILE,fprintf -#include // For exit, system, malloc, calloc, free, etc. +#include // For exit, system, free, etc. #include // For string functions #include // For mkdir #include // For mkdir diff --git a/swad_file_browser.c b/swad_file_browser.c index da3e648d..d19e73c3 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -31,7 +31,7 @@ #include // For PATH_MAX #include // For NULL #include // For asprintf -#include // For exit, system, malloc, free, etc +#include // For exit, system, free, etc #include // For string functions #include // For time #include // For lstat, time_t diff --git a/swad_global.c b/swad_global.c index e77e1096..841923e4 100644 --- a/swad_global.c +++ b/swad_global.c @@ -27,7 +27,7 @@ #include // For NULL #include // For setlocale -#include // For exit, system, malloc, calloc, free, etc +#include // For exit #include // For string functions #include // For gettimeofday #include // For getpid diff --git a/swad_group.c b/swad_group.c index 66d084ed..9e151a67 100644 --- a/swad_group.c +++ b/swad_group.c @@ -483,9 +483,10 @@ void Grp_PutParamsCodGrps (void) if (!Gbl.Usrs.ClassPhoto.AllGroups && Gbl.Crs.Grps.LstGrpsSel.NumGrps) { - MaxLengthGrpCods = Gbl.Crs.Grps.LstGrpsSel.NumGrps * (1 + 20) - 1; + MaxLengthGrpCods = Gbl.Crs.Grps.LstGrpsSel.NumGrps * (Cns_MAX_DECIMAL_DIGITS_LONG + 1) - 1; if ((GrpCods = (char *) malloc (MaxLengthGrpCods + 1)) == NULL) Lay_NotEnoughMemoryExit (); + GrpCods[0] = '\0'; for (NumGrpSel = 0; NumGrpSel < Gbl.Crs.Grps.LstGrpsSel.NumGrps; @@ -3026,21 +3027,17 @@ static void Grp_GetDataOfGroupTypeByCod (struct GroupType *GrpTyp) { MYSQL_RES *mysql_res; MYSQL_ROW row; - unsigned long NumRows; /***** Get data of a type of group from database *****/ - NumRows = DB_QuerySELECT (&mysql_res,"can not get type of group", - "SELECT GrpTypName," - "Mandatory," - "Multiple," - "MustBeOpened," - "UNIX_TIMESTAMP(OpenTime)" + if (DB_QuerySELECT (&mysql_res,"can not get type of group", + "SELECT GrpTypName," // row[0] + "Mandatory," // row[1] + "Multiple," // row[2] + "MustBeOpened," // row[3] + "UNIX_TIMESTAMP(OpenTime)" // row[4] " FROM crs_grp_types" " WHERE CrsCod=%ld AND GrpTypCod=%ld", - Gbl.Hierarchy.Crs.CrsCod,GrpTyp->GrpTypCod); - - /***** Count number of rows in result *****/ - if (NumRows != 1) + Gbl.Hierarchy.Crs.CrsCod,GrpTyp->GrpTypCod) != 1) Lay_ShowErrorAndExit ("Error when getting type of group."); /***** Get some data of group type *****/ @@ -3072,7 +3069,7 @@ static bool Grp_GetMultipleEnrolmentOfAGroupType (long GrpTypCod) "SELECT Multiple FROM crs_grp_types" " WHERE GrpTypCod=%ld", GrpTypCod) != 1) - Lay_ShowErrorAndExit ("Error when getting type of group."); + Lay_ShowErrorAndExit ("Error when getting type of enrolment."); /***** Get multiple enrolment *****/ row = mysql_fetch_row (mysql_res); diff --git a/swad_help.c b/swad_help.c index 6d55a9ab..0ee77427 100644 --- a/swad_help.c +++ b/swad_help.c @@ -25,8 +25,6 @@ /*********************************** Headers *********************************/ /*****************************************************************************/ -#include // For exit, system, malloc, free, rand, etc. - #include "swad_action.h" #include "swad_box.h" #include "swad_config.h" diff --git a/swad_layout.c b/swad_layout.c index fd434d90..3a60523d 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -26,7 +26,7 @@ /*****************************************************************************/ #include // For NULL -#include // For exit, system, malloc, calloc, free, etc +#include // For exit #include // For string functions #include "swad_action.h"