Version 16.31.1

This commit is contained in:
Antonio Cañas Vargas 2016-10-22 17:31:18 +02:00
parent 5e81147246
commit cc423944b7
2 changed files with 16 additions and 9 deletions

View File

@ -150,13 +150,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.31 (2016-10-22)"
#define Log_PLATFORM_VERSION "SWAD 16.31.1 (2016-10-22)"
#define CSS_FILE "swad16.25.css"
#define JS_FILE "swad15.238.1.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.31.1: Oct 22, 2016 Code optimization in renaming of institution. (205104 lines)
Version 16.31: Oct 22, 2016 New form in institution configuration to change full name. (205097 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1591','es','N','Cambiar nombre completo ins.');

View File

@ -76,6 +76,7 @@ static bool Ins_CheckIfICanEdit (struct Institution *Ins);
static Ins_StatusTxt_t Ins_GetStatusTxtFromStatusBits (Ins_Status_t Status);
static Ins_Status_t Ins_GetStatusBitsFromStatusTxt (Ins_StatusTxt_t StatusTxt);
static void Ins_PutParamOtherInsCod (long InsCod);
static void Ins_GetInsCodFromForm (void);
static void Ins_RenameInstitution (struct Institution *Ins,Cns_ShortOrFullName_t ShortOrFullName);
static bool Ins_CheckIfInsNameExistsInCty (const char *FieldName,const char *Name,long InsCod,long CtyCod);
static void Ins_UpdateInsNameDB (long InsCod,const char *FieldName,const char *NewInsName);
@ -1535,10 +1536,7 @@ void Ins_RemoveInstitution (void)
void Ins_RenameInsShort (void)
{
/* Get the code of the institution */
if ((Gbl.Inss.EditingIns.InsCod = Ins_GetParamOtherInsCod ()) < 0)
Lay_ShowErrorAndExit ("Code of institution is missing.");
Ins_GetInsCodFromForm ();
Ins_RenameInstitution (&Gbl.Inss.EditingIns,Cns_SHORT_NAME);
}
@ -1548,10 +1546,7 @@ void Ins_RenameInsShort (void)
void Ins_RenameInsFull (void)
{
/* Get the code of the institution */
if ((Gbl.Inss.EditingIns.InsCod = Ins_GetParamOtherInsCod ()) < 0)
Lay_ShowErrorAndExit ("Code of institution is missing.");
Ins_GetInsCodFromForm ();
Ins_RenameInstitution (&Gbl.Inss.EditingIns,Cns_FULL_NAME);
}
@ -1560,6 +1555,17 @@ void Ins_RenameInsFullInConfig (void)
Ins_RenameInstitution (&Gbl.CurrentIns.Ins,Cns_FULL_NAME);
}
/*****************************************************************************/
/********************** Get the code of the institution **********************/
/*****************************************************************************/
static void Ins_GetInsCodFromForm (void)
{
/***** Get the code of the institution *****/
if ((Gbl.Inss.EditingIns.InsCod = Ins_GetParamOtherInsCod ()) < 0)
Lay_ShowErrorAndExit ("Code of institution is missing.");
}
/*****************************************************************************/
/******************** Change the name of an institution **********************/
/*****************************************************************************/