From 4ff302d48625790445fb97d5a7a6c1a940b445d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 5 Mar 2016 20:39:41 +0100 Subject: [PATCH] Version 15.144.2 --- swad_centre.c | 9 +++++++-- swad_changelog.h | 3 ++- swad_config.h | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/swad_centre.c b/swad_centre.c index de329601..fbc11c8f 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -1626,6 +1626,7 @@ void Ctr_ChangeCentrePlace (void) { extern const char *Txt_The_place_of_the_centre_has_changed; struct Centre *Ctr; + long NewPlcCod; char Query[512]; Ctr = &Gbl.Ctrs.EditingCtr; @@ -1636,12 +1637,16 @@ void Ctr_ChangeCentrePlace (void) Lay_ShowErrorAndExit ("Code of centre is missing."); /* Get parameter with centre code */ - Ctr->PlcCod = Plc_GetParamPlcCod (); + NewPlcCod = Plc_GetParamPlcCod (); + + /***** Get data of centre from database *****/ + Ctr_GetDataOfCentreByCod (Ctr); /***** Update place in table of centres *****/ sprintf (Query,"UPDATE centres SET PlcCod='%ld' WHERE CtrCod='%ld'", - Ctr->PlcCod,Ctr->CtrCod); + NewPlcCod,Ctr->CtrCod); DB_QueryUPDATE (Query,"can not update the place of a centre"); + Ctr->PlcCod = NewPlcCod; /***** Write message to show the change made *****/ Lay_ShowAlert (Lay_SUCCESS,Txt_The_place_of_the_centre_has_changed); diff --git a/swad_changelog.h b/swad_changelog.h index 54ba104d..a1a55e83 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -123,13 +123,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.144.1 (2016-03-03)" +#define Log_PLATFORM_VERSION "SWAD 15.144.2 (2016-03-05)" #define CSS_FILE "swad15.137.2.css" #define JS_FILE "swad15.131.3.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.144.2: Mar 05, 2016 Fixed minor bugs in edition of centres. (195761 lines) Version 15.144.1: Mar 03, 2016 Fixed bugs related to last chages made. (195756 lines) Version 15.144: Mar 03, 2016 Direct login always available. (195755 lines) 3 changes necessary in database: diff --git a/swad_config.h b/swad_config.h index 0f49783e..1907cf9d 100644 --- a/swad_config.h +++ b/swad_config.h @@ -28,8 +28,8 @@ /** Uncomment one of the following installations of SWAD or create your own **/ /*****************************************************************************/ -//#define LOCALHOST_UBUNTU // Comment this line if not applicable -#define OPENSWAD_ORG // Comment this line if not applicable +#define LOCALHOST_UBUNTU // Comment this line if not applicable +//#define OPENSWAD_ORG // Comment this line if not applicable //#define SWAD_UGR_ES // Comment this line if not applicable //#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable