mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-18 06:25:42 +02:00
Version 14.74.8
This commit is contained in:
parent
633e51ea3f
commit
6ec1b70761
|
@ -41,11 +41,12 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.74.7 (2015/02/08)"
|
#define Log_PLATFORM_VERSION "SWAD 14.74.8 (2015/02/10)"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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 | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 14.74.8: Feb 10, 2015 Fixed bug in degree logo. (178039 lines)
|
||||||
Version 14.74.7: Feb 08, 2015 Link to register/remove several users. (178029 lines)
|
Version 14.74.7: Feb 08, 2015 Link to register/remove several users. (178029 lines)
|
||||||
Version 14.74.6: Feb 08, 2015 Changes in layout of form to register/remove one user. (178009 lines)
|
Version 14.74.6: Feb 08, 2015 Changes in layout of form to register/remove one user. (178009 lines)
|
||||||
Version 14.74.5: Feb 08, 2015 Changes in layout of form to register/remove users. (178038 lines)
|
Version 14.74.5: Feb 08, 2015 Changes in layout of form to register/remove users. (178038 lines)
|
||||||
|
|
49
swad_logo.c
49
swad_logo.c
|
@ -80,54 +80,62 @@ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText,
|
||||||
const char *Folder = NULL; // To avoid warning
|
const char *Folder = NULL; // To avoid warning
|
||||||
char PathLogo[PATH_MAX+1];
|
char PathLogo[PATH_MAX+1];
|
||||||
bool LogoFound = false;
|
bool LogoFound = false;
|
||||||
|
long InsCod;
|
||||||
|
long CtrCod;
|
||||||
|
long DegCod;
|
||||||
|
|
||||||
/***** Path to logo *****/
|
/***** Path to logo *****/
|
||||||
if (Cod > 0)
|
if (Icon[Scope]) // Scope is correct
|
||||||
|
{
|
||||||
|
if (Cod > 0) // Institution, centre or degree exists
|
||||||
{
|
{
|
||||||
/* Degree */
|
/* Degree */
|
||||||
if (Scope == Sco_SCOPE_DEG)
|
if (Scope == Sco_SCOPE_DEG)
|
||||||
{
|
{
|
||||||
Folder = Cfg_FOLDER_DEG;
|
Folder = Cfg_FOLDER_DEG;
|
||||||
|
DegCod = Cod;
|
||||||
sprintf (PathLogo,"%s/%s/%02u/%u/logo/%u.png",
|
sprintf (PathLogo,"%s/%s/%02u/%u/logo/%u.png",
|
||||||
Cfg_PATH_SWAD_PUBLIC,Folder,
|
Cfg_PATH_SWAD_PUBLIC,Folder,
|
||||||
(unsigned) (Cod % 100),
|
(unsigned) (DegCod % 100),
|
||||||
(unsigned) Cod,
|
(unsigned) DegCod,
|
||||||
(unsigned) Cod);
|
(unsigned) DegCod);
|
||||||
LogoFound = Fil_CheckIfPathExists (PathLogo);
|
LogoFound = Fil_CheckIfPathExists (PathLogo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Centre */
|
/* Centre */
|
||||||
if (!LogoFound || Scope == Sco_SCOPE_CTR)
|
if (!LogoFound && Scope != Sco_SCOPE_INS)
|
||||||
{
|
{
|
||||||
Folder = Cfg_FOLDER_CTR;
|
Folder = Cfg_FOLDER_CTR;
|
||||||
if (Scope == Sco_SCOPE_DEG)
|
if (Scope == Sco_SCOPE_DEG) // && !LogoFound
|
||||||
Cod = Deg_GetCtrCodOfDegreeByCod (Cod);
|
CtrCod = Deg_GetCtrCodOfDegreeByCod (Cod);
|
||||||
|
else
|
||||||
|
CtrCod = Cod;
|
||||||
sprintf (PathLogo,"%s/%s/%02u/%u/logo/%u.png",
|
sprintf (PathLogo,"%s/%s/%02u/%u/logo/%u.png",
|
||||||
Cfg_PATH_SWAD_PUBLIC,Folder,
|
Cfg_PATH_SWAD_PUBLIC,Folder,
|
||||||
(unsigned) (Cod % 100),
|
(unsigned) (CtrCod % 100),
|
||||||
(unsigned) Cod,
|
(unsigned) CtrCod,
|
||||||
(unsigned) Cod);
|
(unsigned) CtrCod);
|
||||||
LogoFound = Fil_CheckIfPathExists (PathLogo);
|
LogoFound = Fil_CheckIfPathExists (PathLogo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Institution */
|
/* Institution */
|
||||||
if (!LogoFound || Scope == Sco_SCOPE_INS)
|
if (!LogoFound)
|
||||||
{
|
{
|
||||||
Folder = Cfg_FOLDER_INS;
|
Folder = Cfg_FOLDER_INS;
|
||||||
if (Scope == Sco_SCOPE_DEG)
|
if (Scope == Sco_SCOPE_DEG) // && !LogoFound
|
||||||
Cod = Deg_GetInsCodOfDegreeByCod (Cod);
|
InsCod = Deg_GetInsCodOfDegreeByCod (Cod);
|
||||||
else if (Scope == Sco_SCOPE_CTR)
|
else if (Scope == Sco_SCOPE_CTR) // && !LogoFound
|
||||||
Cod = Ctr_GetInsCodOfCentreByCod (Cod);
|
InsCod = Ctr_GetInsCodOfCentreByCod (Cod);
|
||||||
|
else
|
||||||
|
InsCod = Cod;
|
||||||
sprintf (PathLogo,"%s/%s/%02u/%u/logo/%u.png",
|
sprintf (PathLogo,"%s/%s/%02u/%u/logo/%u.png",
|
||||||
Cfg_PATH_SWAD_PUBLIC,Folder,
|
Cfg_PATH_SWAD_PUBLIC,Folder,
|
||||||
(unsigned) (Cod % 100),
|
(unsigned) (InsCod % 100),
|
||||||
(unsigned) Cod,
|
(unsigned) InsCod,
|
||||||
(unsigned) Cod);
|
(unsigned) InsCod);
|
||||||
LogoFound = Fil_CheckIfPathExists (PathLogo);
|
LogoFound = Fil_CheckIfPathExists (PathLogo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
LogoFound = false;
|
|
||||||
|
|
||||||
if (LogoFound || PutIconIfNotExists)
|
if (LogoFound || PutIconIfNotExists)
|
||||||
{
|
{
|
||||||
|
@ -150,6 +158,7 @@ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText,
|
||||||
fprintf (Gbl.F.Out," />");
|
fprintf (Gbl.F.Out," />");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Put a link to the action used to request *******************/
|
/*************** Put a link to the action used to request *******************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user