From 7816f1ed48601da05766361d929dd105be9bd0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 30 Jan 2017 01:08:25 +0100 Subject: [PATCH] Version 16.132.2 --- swad_changelog.h | 3 ++- swad_parameter.c | 16 +++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index b20e93c1..55bd7201 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -191,13 +191,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.132.1 (2017-01-29)" +#define Log_PLATFORM_VERSION "SWAD 16.132.2 (2017-01-30)" #define CSS_FILE "swad16.123.css" #define JS_FILE "swad16.123.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.132.2: Jan 30, 2017 Fixed bug in file browser. (211911 lines) Version 16.132.1: Jan 29, 2017 Fixed bug in listing of users. (211916 lines) Version 16.132: Jan 29, 2017 Code refactoring in unsigned parameters. (211915 lines) Version 16.131: Jan 29, 2017 Code refactoring in unsigned parameters. Not finished. (211856 lines) diff --git a/swad_parameter.c b/swad_parameter.c index 2e53e287..5a19e9c7 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -651,7 +651,7 @@ void Par_GetMainParameters (void) extern Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD]; extern const char *The_ThemeId[The_NUM_THEMES]; extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS]; - unsigned ActCod; + long ActCod; char Nickname[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1]; char LongStr[1 + 10 + 1]; @@ -712,16 +712,10 @@ void Par_GetMainParameters (void) } /***** Get action to perform *****/ - ActCod = (unsigned) Par_GetParToUnsignedLong ("act", - ActUnk, - Act_MAX_ACTION_COD, - ActUnk); - if (ActCod == ActUnk) - ActCod = (unsigned) Par_GetParToUnsignedLong ("ActCod", - ActUnk, - Act_MAX_ACTION_COD, - ActUnk); - if (ActCod != ActUnk) + ActCod = Par_GetParToLong ("act"); + if (ActCod < 0) + ActCod = Par_GetParToLong ("ActCod"); + if (ActCod >= 0 && ActCod <= Act_MAX_ACTION_COD) Gbl.Action.Act = Act_FromActCodToAction[ActCod]; /***** Some preliminary adjusts depending on action *****/