mirror of https://github.com/acanas/swad-core.git
Version 23.35.2: Oct 11, 2023 Fixed bugs in short/full names.
This commit is contained in:
parent
f95b83509a
commit
357bf48299
|
@ -605,7 +605,6 @@ void Ban_RenameBannerFull (void)
|
||||||
static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
||||||
Nam_ShrtOrFullName_t ShrtOrFull)
|
Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -638,7 +637,7 @@ static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If banner was in database... *****/
|
/***** If banner was in database... *****/
|
||||||
if (Ban_DB_CheckIfBannerNameExists (Nam_Params[ShrtOrFull],
|
if (Ban_DB_CheckIfBannerNameExists (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Ban->BanCod,
|
NewName,Ban->BanCod,
|
||||||
-1L,0)) // Unused
|
-1L,0)) // Unused
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
|
|
|
@ -167,8 +167,8 @@ void Ban_DB_HideOrUnhideBanner (long BanCod,HidVis_HiddenOrVisible_t HiddenOrVis
|
||||||
/***************** Update banner name in table of banners ********************/
|
/***************** Update banner name in table of banners ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Ban_DB_UpdateBanName (long BanCod,const char *FldName,
|
void Ban_DB_UpdateBanName (long BanCod,
|
||||||
const char *NewBanName)
|
const char *FldName,const char *NewBanName)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not update the name of a banner",
|
DB_QueryUPDATE ("can not update the name of a banner",
|
||||||
"UPDATE ban_banners"
|
"UPDATE ban_banners"
|
||||||
|
|
|
@ -45,8 +45,8 @@ bool Ban_DB_CheckIfBannerNameExists (const char *FldName,const char *Name,long C
|
||||||
|
|
||||||
void Ban_DB_CreateBanner (const struct Ban_Banner *Ban);
|
void Ban_DB_CreateBanner (const struct Ban_Banner *Ban);
|
||||||
void Ban_DB_HideOrUnhideBanner (long BanCod,HidVis_HiddenOrVisible_t HiddenOrVisible);
|
void Ban_DB_HideOrUnhideBanner (long BanCod,HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||||
void Ban_DB_UpdateBanName (long BanCod,const char *FldName,
|
void Ban_DB_UpdateBanName (long BanCod,
|
||||||
const char *NewBanName);
|
const char *FldName,const char *NewBanName);
|
||||||
void Ban_DB_UpdateBanImg (long BanCod,
|
void Ban_DB_UpdateBanImg (long BanCod,
|
||||||
const char NewImg[Ban_MAX_BYTES_IMAGE + 1]);
|
const char NewImg[Ban_MAX_BYTES_IMAGE + 1]);
|
||||||
void Ban_DB_UpdateBanWWW (long BanCod,
|
void Ban_DB_UpdateBanWWW (long BanCod,
|
||||||
|
|
|
@ -528,7 +528,6 @@ void Bld_RenameBuildingFull (void)
|
||||||
|
|
||||||
static void Bld_RenameBuilding (Nam_ShrtOrFullName_t ShrtOrFull)
|
static void Bld_RenameBuilding (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -559,16 +558,15 @@ static void Bld_RenameBuilding (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If building was in database... *****/
|
/***** If building was in database... *****/
|
||||||
if (Bld_DB_CheckIfBuildingNameExists (Nam_Params[ShrtOrFull],
|
if (Bld_DB_CheckIfBuildingNameExists (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Bld_EditingBuilding->BldCod,
|
NewName,Bld_EditingBuilding->BldCod,
|
||||||
-1L,0)) // Unused
|
-1L,0)) // Unused
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
Bld_DB_UpdateBuildingName (Bld_EditingBuilding->BldCod,
|
Bld_DB_UpdateBuildingField (Bld_EditingBuilding->BldCod,
|
||||||
Nam_Fields[ShrtOrFull],
|
Nam_Fields[ShrtOrFull],NewName);
|
||||||
NewName);
|
|
||||||
|
|
||||||
/* Write message to show the change made */
|
/* Write message to show the change made */
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
|
@ -617,7 +615,8 @@ void Bld_ChangeBuildingLocation (void)
|
||||||
if (strcmp (Bld_EditingBuilding->Location,NewLocation)) // Different locations
|
if (strcmp (Bld_EditingBuilding->Location,NewLocation)) // Different locations
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
Bld_DB_UpdateBuildingName (Bld_EditingBuilding->BldCod,"Location",NewLocation);
|
Bld_DB_UpdateBuildingField (Bld_EditingBuilding->BldCod,
|
||||||
|
"Location",NewLocation);
|
||||||
Str_Copy (Bld_EditingBuilding->Location,NewLocation,
|
Str_Copy (Bld_EditingBuilding->Location,NewLocation,
|
||||||
sizeof (Bld_EditingBuilding->Location) - 1);
|
sizeof (Bld_EditingBuilding->Location) - 1);
|
||||||
|
|
||||||
|
|
|
@ -135,17 +135,17 @@ bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Update building changing old name by new name ***************/
|
/************* Update building changing old field by new field **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Bld_DB_UpdateBuildingName (long BldCod,const char *FldName,const char *NewBuildingName)
|
void Bld_DB_UpdateBuildingField (long BldCod,
|
||||||
|
const char *FldName,const char *Value)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not update the name of a building",
|
DB_QueryUPDATE ("can not update building",
|
||||||
"UPDATE bld_buildings"
|
"UPDATE bld_buildings"
|
||||||
" SET %s='%s'"
|
" SET %s='%s'"
|
||||||
" WHERE BldCod=%ld",
|
" WHERE BldCod=%ld",
|
||||||
FldName,
|
FldName,Value,
|
||||||
NewBuildingName,
|
|
||||||
BldCod);
|
BldCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,4 +173,3 @@ void Bld_DB_RemoveAllBuildingsInCtr (long CtrCod)
|
||||||
" WHERE CtrCod=%ld",
|
" WHERE CtrCod=%ld",
|
||||||
CtrCod);
|
CtrCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@ bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long
|
||||||
__attribute__((unused)) long PrtCod,
|
__attribute__((unused)) long PrtCod,
|
||||||
__attribute__((unused)) unsigned Year);
|
__attribute__((unused)) unsigned Year);
|
||||||
|
|
||||||
void Bld_DB_UpdateBuildingName (long BldCod,const char *FldName,const char *NewBuildingName);
|
void Bld_DB_UpdateBuildingField (long BldCod,
|
||||||
|
const char *FldName,const char *Value);
|
||||||
|
|
||||||
void Bld_DB_RemoveBuilding (long BldCod);
|
void Bld_DB_RemoveBuilding (long BldCod);
|
||||||
void Bld_DB_RemoveAllBuildingsInCtr (long CtrCod);
|
void Bld_DB_RemoveAllBuildingsInCtr (long CtrCod);
|
||||||
|
|
|
@ -1061,7 +1061,6 @@ void Ctr_RenameCenterFull (void)
|
||||||
|
|
||||||
void Ctr_RenameCenter (struct Hie_Node *Ctr,Nam_ShrtOrFullName_t ShrtOrFull)
|
void Ctr_RenameCenter (struct Hie_Node *Ctr,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -1091,7 +1090,7 @@ void Ctr_RenameCenter (struct Hie_Node *Ctr,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If degree was in database... *****/
|
/***** If degree was in database... *****/
|
||||||
if (Ctr_DB_CheckIfCtrNameExistsInIns (Nam_Params[ShrtOrFull],
|
if (Ctr_DB_CheckIfCtrNameExistsInIns (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Ctr->HieCod,
|
NewName,Ctr->HieCod,
|
||||||
Gbl.Hierarchy.Node[Hie_INS].HieCod,
|
Gbl.Hierarchy.Node[Hie_INS].HieCod,
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
|
|
|
@ -548,15 +548,15 @@ void Ctr_DB_UpdateCtrPlc (long CtrCod,long NewPlcCod)
|
||||||
/****************** Update center name in table of centers *******************/
|
/****************** Update center name in table of centers *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Ctr_DB_UpdateCtrName (long CtrCod,const char *FldName,const char *NewCtrName)
|
void Ctr_DB_UpdateCtrName (long CtrCod,
|
||||||
|
const char *FldName,const char *NewCtrName)
|
||||||
{
|
{
|
||||||
/***** Update center changing old name by new name */
|
/***** Update center changing old name by new name */
|
||||||
DB_QueryUPDATE ("can not update the name of a center",
|
DB_QueryUPDATE ("can not update the name of a center",
|
||||||
"UPDATE ctr_centers"
|
"UPDATE ctr_centers"
|
||||||
" SET %s='%s'"
|
" SET %s='%s'"
|
||||||
" WHERE CtrCod=%ld",
|
" WHERE CtrCod=%ld",
|
||||||
FldName,
|
FldName,NewCtrName,
|
||||||
NewCtrName,
|
|
||||||
CtrCod);
|
CtrCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,8 @@ unsigned Ctr_DB_GetNumCtrsWithUsrs (Rol_Role_t Role,
|
||||||
|
|
||||||
void Ctr_DB_UpdateCtrIns (long CtrCod,long NewInsCod);
|
void Ctr_DB_UpdateCtrIns (long CtrCod,long NewInsCod);
|
||||||
void Ctr_DB_UpdateCtrPlc (long CtrCod,long NewPlcCod);
|
void Ctr_DB_UpdateCtrPlc (long CtrCod,long NewPlcCod);
|
||||||
void Ctr_DB_UpdateCtrName (long CtrCod,const char *FldName,const char *NewCtrName);
|
void Ctr_DB_UpdateCtrName (long CtrCod,
|
||||||
|
const char *FldName,const char *NewCtrName);
|
||||||
void Ctr_DB_UpdateCtrWWW (long CtrCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
void Ctr_DB_UpdateCtrWWW (long CtrCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||||
void Ctr_DB_UpdateCtrPhotoAttribution (long CtrCod,const char NewPhotoAttribution[Med_MAX_BYTES_ATTRIBUTION + 1]);
|
void Ctr_DB_UpdateCtrPhotoAttribution (long CtrCod,const char NewPhotoAttribution[Med_MAX_BYTES_ATTRIBUTION + 1]);
|
||||||
void Ctr_DB_UpdateCtrCoordinate (long CtrCod,
|
void Ctr_DB_UpdateCtrCoordinate (long CtrCod,
|
||||||
|
|
|
@ -633,11 +633,12 @@ Me sale este error, no s
|
||||||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 23.35.1 (2023-10-11)"
|
#define Log_PLATFORM_VERSION "SWAD 23.35.2 (2023-10-11)"
|
||||||
#define CSS_FILE "swad23.35.1.css"
|
#define CSS_FILE "swad23.35.1.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
Version 23.35.1: Oct 11, 2023 Changes in CSS related to short/full names. (335549 lines)
|
Version 23.35.2: Oct 11, 2023 Fixed bugs in short/full names. (335550 lines)
|
||||||
|
Version 23.35.1: Oct 11, 2023 Changes in CSS related to short/full names. (335550 lines)
|
||||||
Version 23.35: Oct 10, 2023 Fixed bugs in short/full names. (335549 lines)
|
Version 23.35: Oct 10, 2023 Fixed bugs in short/full names. (335549 lines)
|
||||||
Version 23.34: Oct 10, 2023 New module swad_name for short and full names. (335608 lines)
|
Version 23.34: Oct 10, 2023 New module swad_name for short and full names. (335608 lines)
|
||||||
Version 23.33.3: Oct 10, 2023 Code refactoring in short and full names. (335515 lines)
|
Version 23.33.3: Oct 10, 2023 Code refactoring in short and full names. (335515 lines)
|
||||||
|
|
|
@ -1698,7 +1698,6 @@ void Crs_RenameCourseFull (void)
|
||||||
|
|
||||||
void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFull)
|
void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -1728,7 +1727,7 @@ void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If course was in database... *****/
|
/***** If course was in database... *****/
|
||||||
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_Params[ShrtOrFull],
|
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Crs->HieCod,
|
NewName,Crs->HieCod,
|
||||||
Crs->PrtCod,Crs->Specific.Year))
|
Crs->PrtCod,Crs->Specific.Year))
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
|
|
|
@ -510,7 +510,8 @@ void Crs_DB_UpdateCrsYear (long CrsCod,unsigned NewYear)
|
||||||
/***************** Update course name in table of courses ********************/
|
/***************** Update course name in table of courses ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Crs_DB_UpdateCrsName (long CrsCod,const char *FldName,const char *NewCrsName)
|
void Crs_DB_UpdateCrsName (long CrsCod,
|
||||||
|
const char *FldName,const char *NewCrsName)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not update the name of a course",
|
DB_QueryUPDATE ("can not update the name of a course",
|
||||||
"UPDATE crs_courses"
|
"UPDATE crs_courses"
|
||||||
|
|
|
@ -67,7 +67,8 @@ unsigned Crs_DB_GetCrssFromUsr (MYSQL_RES **mysql_res,long UsrCod,long PrtCod);
|
||||||
|
|
||||||
void Crs_DB_UpdateInstitutionalCrsCod (long CrsCod,const char *NewInstitutionalCrsCod);
|
void Crs_DB_UpdateInstitutionalCrsCod (long CrsCod,const char *NewInstitutionalCrsCod);
|
||||||
void Crs_DB_UpdateCrsYear (long CrsCod,unsigned NewYear);
|
void Crs_DB_UpdateCrsYear (long CrsCod,unsigned NewYear);
|
||||||
void Crs_DB_UpdateCrsName (long CrsCod,const char *FldName,const char *NewCrsName);
|
void Crs_DB_UpdateCrsName (long CrsCod,
|
||||||
|
const char *FldName,const char *NewCrsName);
|
||||||
void Crs_DB_UpdateCrsDeg (long CrsCod,long DegCod);
|
void Crs_DB_UpdateCrsDeg (long CrsCod,long DegCod);
|
||||||
void Crs_DB_UpdateCrsStatus (long CrsCod,Hie_Status_t Status);
|
void Crs_DB_UpdateCrsStatus (long CrsCod,Hie_Status_t Status);
|
||||||
|
|
||||||
|
|
|
@ -1283,7 +1283,6 @@ void Deg_RenameDegreeFull (void)
|
||||||
|
|
||||||
void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFull)
|
void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -1311,7 +1310,7 @@ void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If degree was in database... *****/
|
/***** If degree was in database... *****/
|
||||||
if (Deg_DB_CheckIfDegNameExistsInCtr (Nam_Params[ShrtOrFull],
|
if (Deg_DB_CheckIfDegNameExistsInCtr (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Deg->HieCod,Deg->PrtCod,
|
NewName,Deg->HieCod,Deg->PrtCod,
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
|
|
|
@ -689,15 +689,14 @@ void Deg_DB_UpdateDegTypName (long DegTypCod,
|
||||||
/***************** Update degree name in table of degrees ********************/
|
/***************** Update degree name in table of degrees ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Deg_DB_UpdateDegNameDB (long DegCod,const char *FldName,
|
void Deg_DB_UpdateDegNameDB (long DegCod,
|
||||||
const char NewDegName[Nam_MAX_BYTES_FULL_NAME + 1])
|
const char *FldName,const char *NewDegName)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not update the name of a degree",
|
DB_QueryUPDATE ("can not update the name of a degree",
|
||||||
"UPDATE deg_degrees"
|
"UPDATE deg_degrees"
|
||||||
" SET %s='%s'"
|
" SET %s='%s'"
|
||||||
" WHERE DegCod=%ld",
|
" WHERE DegCod=%ld",
|
||||||
FldName,
|
FldName,NewDegName,
|
||||||
NewDegName,
|
|
||||||
DegCod);
|
DegCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,8 @@ unsigned Deg_DB_GetNumDegsInCtr (long CtrCod);
|
||||||
|
|
||||||
void Deg_DB_UpdateDegTypName (long DegTypCod,
|
void Deg_DB_UpdateDegTypName (long DegTypCod,
|
||||||
const char NewNameDegTyp[DegTyp_MAX_BYTES_DEGREE_TYPE_NAME + 1]);
|
const char NewNameDegTyp[DegTyp_MAX_BYTES_DEGREE_TYPE_NAME + 1]);
|
||||||
void Deg_DB_UpdateDegNameDB (long DegCod,const char *FldName,
|
void Deg_DB_UpdateDegNameDB (long DegCod,
|
||||||
const char NewDegName[Nam_MAX_BYTES_FULL_NAME + 1]);
|
const char *FldName,const char *NewDegName);
|
||||||
void Deg_DB_UpdateDegCtr (long DegCod,long NewCtrCod);
|
void Deg_DB_UpdateDegCtr (long DegCod,long NewCtrCod);
|
||||||
void Deg_DB_UpdateDegTyp (long DegCod,long NewDegTypCod);
|
void Deg_DB_UpdateDegTyp (long DegCod,long NewDegTypCod);
|
||||||
void Deg_DB_UpdateDegWWW (long DegCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
void Deg_DB_UpdateDegWWW (long DegCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||||
|
|
|
@ -670,7 +670,6 @@ void Dpt_RenameDepartFull (void)
|
||||||
|
|
||||||
static void Dpt_RenameDepartment (Nam_ShrtOrFullName_t ShrtOrFull)
|
static void Dpt_RenameDepartment (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -701,7 +700,7 @@ static void Dpt_RenameDepartment (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If name department was not in database... *****/
|
/***** If name department was not in database... *****/
|
||||||
if (Dpt_DB_CheckIfDepartmentNameExists (Nam_Params[ShrtOrFull],
|
if (Dpt_DB_CheckIfDepartmentNameExists (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Dpt_EditingDpt->DptCod,
|
NewName,Dpt_EditingDpt->DptCod,
|
||||||
-1L, // Unused
|
-1L, // Unused
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
|
|
|
@ -227,7 +227,8 @@ void Dpt_DB_UpdateDptIns (long DptCod,long NewInsCod)
|
||||||
/************* Update department name in table of departments ****************/
|
/************* Update department name in table of departments ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Dpt_DB_UpdateDptName (long DptCod,const char *FldName,const char *NewDptName)
|
void Dpt_DB_UpdateDptName (long DptCod,
|
||||||
|
const char *FldName,const char *NewDptName)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not update the name of a department",
|
DB_QueryUPDATE ("can not update the name of a department",
|
||||||
"UPDATE dpt_departments"
|
"UPDATE dpt_departments"
|
||||||
|
|
|
@ -48,7 +48,8 @@ unsigned Dpt_DB_GetNumDepartmentsInInstitution (long InsCod);
|
||||||
unsigned Dpt_DB_GetNumTchsCurrentInsInDepartment (long DptCod);
|
unsigned Dpt_DB_GetNumTchsCurrentInsInDepartment (long DptCod);
|
||||||
|
|
||||||
void Dpt_DB_UpdateDptIns (long DptCod,long NewInsCod);
|
void Dpt_DB_UpdateDptIns (long DptCod,long NewInsCod);
|
||||||
void Dpt_DB_UpdateDptName (long DptCod,const char *FldName,const char *NewDptName);
|
void Dpt_DB_UpdateDptName (long DptCod,
|
||||||
|
const char *FldName,const char *NewDptName);
|
||||||
void Dpt_DB_UpdateDptWWW (long DptCod,char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
void Dpt_DB_UpdateDptWWW (long DptCod,char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||||
|
|
||||||
void Dpt_DB_RemoveDepartment (long DptCod);
|
void Dpt_DB_RemoveDepartment (long DptCod);
|
||||||
|
|
|
@ -3308,7 +3308,8 @@ void Grp_ReceiveFormNewGrp (void)
|
||||||
if (Gbl.Crs.Grps.GrpName[0]) // If there's a group name
|
if (Gbl.Crs.Grps.GrpName[0]) // If there's a group name
|
||||||
{
|
{
|
||||||
/***** If name of group was in database... *****/
|
/***** If name of group was in database... *****/
|
||||||
if (Grp_DB_CheckIfGrpNameExistsForGrpTyp (Gbl.Crs.Grps.GrpTyp.GrpTypCod,Gbl.Crs.Grps.GrpName,-1L))
|
if (Grp_DB_CheckIfGrpNameExistsForGrpTyp (Gbl.Crs.Grps.GrpTyp.GrpTypCod,
|
||||||
|
Gbl.Crs.Grps.GrpName,-1L))
|
||||||
{
|
{
|
||||||
AlertType = Ale_WARNING;
|
AlertType = Ale_WARNING;
|
||||||
snprintf (AlertTxt,sizeof (AlertTxt),
|
snprintf (AlertTxt,sizeof (AlertTxt),
|
||||||
|
@ -4020,7 +4021,8 @@ void Grp_RenameGroupType (void)
|
||||||
if (strcmp (Gbl.Crs.Grps.GrpTyp.GrpTypName,NewNameGrpTyp)) // Different names
|
if (strcmp (Gbl.Crs.Grps.GrpTyp.GrpTypName,NewNameGrpTyp)) // Different names
|
||||||
{
|
{
|
||||||
/***** If group type was in database... *****/
|
/***** If group type was in database... *****/
|
||||||
if (Grp_DB_CheckIfGrpTypNameExistsInCurrentCrs (NewNameGrpTyp,Gbl.Crs.Grps.GrpTyp.GrpTypCod))
|
if (Grp_DB_CheckIfGrpTypNameExistsInCurrentCrs (NewNameGrpTyp,
|
||||||
|
Gbl.Crs.Grps.GrpTyp.GrpTypCod))
|
||||||
{
|
{
|
||||||
AlertType = Ale_WARNING;
|
AlertType = Ale_WARNING;
|
||||||
snprintf (AlertTxt,sizeof (AlertTxt),
|
snprintf (AlertTxt,sizeof (AlertTxt),
|
||||||
|
@ -4099,7 +4101,8 @@ void Grp_RenameGroup (void)
|
||||||
if (strcmp (GrpDat.GrpName,NewNameGrp)) // Different names
|
if (strcmp (GrpDat.GrpName,NewNameGrp)) // Different names
|
||||||
{
|
{
|
||||||
/***** If group was in database... *****/
|
/***** If group was in database... *****/
|
||||||
if (Grp_DB_CheckIfGrpNameExistsForGrpTyp (GrpDat.GrpTypCod,NewNameGrp,Gbl.Crs.Grps.GrpCod))
|
if (Grp_DB_CheckIfGrpNameExistsForGrpTyp (GrpDat.GrpTypCod,NewNameGrp,
|
||||||
|
Gbl.Crs.Grps.GrpCod))
|
||||||
{
|
{
|
||||||
AlertType = Ale_WARNING;
|
AlertType = Ale_WARNING;
|
||||||
snprintf (AlertTxt,sizeof (AlertTxt),
|
snprintf (AlertTxt,sizeof (AlertTxt),
|
||||||
|
|
|
@ -1142,7 +1142,6 @@ void Ins_RenameInsFull (void)
|
||||||
|
|
||||||
void Ins_RenameInstitution (struct Hie_Node *Ins,Nam_ShrtOrFullName_t ShrtOrFull)
|
void Ins_RenameInstitution (struct Hie_Node *Ins,Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -1169,7 +1168,7 @@ void Ins_RenameInstitution (struct Hie_Node *Ins,Nam_ShrtOrFullName_t ShrtOrFull
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If institution was not in database... *****/
|
/***** If institution was not in database... *****/
|
||||||
if (Ins_DB_CheckIfInsNameExistsInCty (Nam_Params[ShrtOrFull],
|
if (Ins_DB_CheckIfInsNameExistsInCty (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Ins->HieCod,
|
NewName,Ins->HieCod,
|
||||||
Gbl.Hierarchy.Node[Hie_CTY].HieCod,
|
Gbl.Hierarchy.Node[Hie_CTY].HieCod,
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
|
|
|
@ -526,7 +526,6 @@ void Lnk_RenameLinkFull (void)
|
||||||
|
|
||||||
static void Lnk_RenameLink (Nam_ShrtOrFullName_t ShrtOrFull)
|
static void Lnk_RenameLink (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -557,7 +556,7 @@ static void Lnk_RenameLink (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If link was in database... *****/
|
/***** If link was in database... *****/
|
||||||
if (Lnk_DB_CheckIfLinkNameExists (Nam_Params[ShrtOrFull],
|
if (Lnk_DB_CheckIfLinkNameExists (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Lnk_EditingLnk->LnkCod,
|
NewName,Lnk_EditingLnk->LnkCod,
|
||||||
-1L, // Unused
|
-1L, // Unused
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
|
|
|
@ -630,7 +630,8 @@ static void Mai_RenameMailDomain (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If mail was in database... *****/
|
/***** If mail was in database... *****/
|
||||||
if (Mai_DB_CheckIfMailDomainNameExists (ParName[ShrtOrFull],NewName,Mai_EditingMai->MaiCod))
|
if (Mai_DB_CheckIfMailDomainNameExists (FldName[ShrtOrFull],NewName,
|
||||||
|
Mai_EditingMai->MaiCod))
|
||||||
Ale_CreateAlert (Ale_WARNING,Mai_EMAIL_SECTION_ID,
|
Ale_CreateAlert (Ale_WARNING,Mai_EMAIL_SECTION_ID,
|
||||||
Txt_The_email_domain_X_already_exists,
|
Txt_The_email_domain_X_already_exists,
|
||||||
NewName);
|
NewName);
|
||||||
|
|
|
@ -579,7 +579,6 @@ void Plc_RenamePlaceFull (void)
|
||||||
|
|
||||||
static void Plc_RenamePlace (Nam_ShrtOrFullName_t ShrtOrFull)
|
static void Plc_RenamePlace (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -610,7 +609,7 @@ static void Plc_RenamePlace (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If place was in database... *****/
|
/***** If place was in database... *****/
|
||||||
if (Plc_DB_CheckIfPlaceNameExists (Nam_Params[ShrtOrFull],
|
if (Plc_DB_CheckIfPlaceNameExists (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Plc_EditingPlc->PlcCod,
|
NewName,Plc_EditingPlc->PlcCod,
|
||||||
Gbl.Hierarchy.Node[Hie_INS].HieCod,
|
Gbl.Hierarchy.Node[Hie_INS].HieCod,
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
|
|
|
@ -55,7 +55,8 @@ void Plc_DB_CreatePlace (const struct Plc_Place *Plc)
|
||||||
/****************** Update place name in table of places *********************/
|
/****************** Update place name in table of places *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Plc_DB_UpdatePlcName (long PlcCod,const char *FldName,const char *NewPlcName)
|
void Plc_DB_UpdatePlcName (long PlcCod,
|
||||||
|
const char *FldName,const char *NewPlcName)
|
||||||
{
|
{
|
||||||
/***** Update place changing old name by new name */
|
/***** Update place changing old name by new name */
|
||||||
DB_QueryUPDATE ("can not update the name of a place",
|
DB_QueryUPDATE ("can not update the name of a place",
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Plc_DB_CreatePlace (const struct Plc_Place *Plc);
|
void Plc_DB_CreatePlace (const struct Plc_Place *Plc);
|
||||||
void Plc_DB_UpdatePlcName (long PlcCod,const char *FldName,const char *NewPlcName);
|
void Plc_DB_UpdatePlcName (long PlcCod,
|
||||||
|
const char *FldName,const char *NewPlcName);
|
||||||
|
|
||||||
unsigned Plc_DB_GetListPlaces (MYSQL_RES **mysql_res,Plc_Order_t SelectedOrder);
|
unsigned Plc_DB_GetListPlaces (MYSQL_RES **mysql_res,Plc_Order_t SelectedOrder);
|
||||||
unsigned Plc_DB_GetPlaceDataByCod (MYSQL_RES **mysql_res,long PlcCod);
|
unsigned Plc_DB_GetPlaceDataByCod (MYSQL_RES **mysql_res,long PlcCod);
|
||||||
|
|
|
@ -1046,7 +1046,6 @@ void Roo_RenameRoomFull (void)
|
||||||
|
|
||||||
static void Roo_RenameRoom (Nam_ShrtOrFullName_t ShrtOrFull)
|
static void Roo_RenameRoom (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
{
|
{
|
||||||
extern const char *Nam_Params[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_Fields[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytes[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
|
@ -1077,7 +1076,7 @@ static void Roo_RenameRoom (Nam_ShrtOrFullName_t ShrtOrFull)
|
||||||
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFull],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If room was in database... *****/
|
/***** If room was in database... *****/
|
||||||
if (Roo_DB_CheckIfRoomNameExists (Nam_Params[ShrtOrFull],
|
if (Roo_DB_CheckIfRoomNameExists (Nam_Fields[ShrtOrFull],
|
||||||
NewName,Roo_EditingRoom->RooCod,
|
NewName,Roo_EditingRoom->RooCod,
|
||||||
Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
||||||
0)) // Unused
|
0)) // Unused
|
||||||
|
|
Loading…
Reference in New Issue