mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-26 18:35:44 +02:00
Version 14.79.2
This commit is contained in:
parent
a509c959d7
commit
af48305df4
|
@ -103,12 +103,12 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.79.1 (2015/03/06)"
|
#define Log_PLATFORM_VERSION "SWAD 14.79.2 (2015/03/06)"
|
||||||
|
|
||||||
// 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.79.2: Mar 06, 2015 Public profile is shown depending on visibility. (178759 lines)
|
||||||
Version 14.79.1: Mar 06, 2015 Add options to change visibility of public profile. (178769 lines)
|
Version 14.79.1: Mar 06, 2015 Add options to change visibility of public profile. (178769 lines)
|
||||||
3 changes necessary in database:
|
3 changes necessary in database:
|
||||||
ALTER TABLE usr_data ADD COLUMN ProfileVisibility ENUM('user','course','system','world') NOT NULL DEFAULT 'user' AFTER PhotoVisibility;
|
ALTER TABLE usr_data ADD COLUMN ProfileVisibility ENUM('user','course','system','world') NOT NULL DEFAULT 'user' AFTER PhotoVisibility;
|
||||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -46509,27 +46509,6 @@ const char *Txt_User_ID =
|
||||||
"Nº de identif. do utilizador";
|
"Nº de identif. do utilizador";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_User_not_found =
|
|
||||||
#if L==0
|
|
||||||
"Usuari no trobat";
|
|
||||||
#elif L==1
|
|
||||||
"Benutzer nicht gefunden.";
|
|
||||||
#elif L==2
|
|
||||||
"User not found.";
|
|
||||||
#elif L==3
|
|
||||||
"Usuario/a no encontrado/a.";
|
|
||||||
#elif L==4
|
|
||||||
"Utilisateur introuvable.";
|
|
||||||
#elif L==5
|
|
||||||
"Usuario/a no encontrado/a."; // Okoteve traducción
|
|
||||||
#elif L==6
|
|
||||||
"IUtente non trovato.";
|
|
||||||
#elif L==7
|
|
||||||
"Nie znaleziono użytkownika.";
|
|
||||||
#elif L==8
|
|
||||||
"Utilizador não encontrado.";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_User_not_found_or_you_do_not_have_permission_ =
|
const char *Txt_User_not_found_or_you_do_not_have_permission_ =
|
||||||
#if L==0
|
#if L==0
|
||||||
"Usuari no trobat"
|
"Usuari no trobat"
|
||||||
|
|
14
swad_user.c
14
swad_user.c
|
@ -7385,9 +7385,10 @@ void Usr_RequestUserProfile (void)
|
||||||
|
|
||||||
void Usr_ShowUserProfile (void)
|
void Usr_ShowUserProfile (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_User_not_found;
|
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||||
char Nickname[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA + 1];
|
char Nickname[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA + 1];
|
||||||
long OtherUsrCod;
|
long OtherUsrCod;
|
||||||
|
bool Error = false;
|
||||||
|
|
||||||
/***** Get user *****/
|
/***** Get user *****/
|
||||||
if (Gbl.Usrs.Other.UsrDat.UsrCod < 0)
|
if (Gbl.Usrs.Other.UsrDat.UsrCod < 0)
|
||||||
|
@ -7404,6 +7405,9 @@ void Usr_ShowUserProfile (void)
|
||||||
|
|
||||||
/***** Check if user exists and get his data *****/
|
/***** Check if user exists and get his data *****/
|
||||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Existing user
|
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Existing user
|
||||||
|
{
|
||||||
|
/***** Check if I can see the public profile *****/
|
||||||
|
if (Pri_ShowIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility,Gbl.Usrs.Other.UsrDat.UsrCod))
|
||||||
{
|
{
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||||
{
|
{
|
||||||
|
@ -7422,9 +7426,15 @@ void Usr_ShowUserProfile (void)
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Error = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Error = true;
|
||||||
|
|
||||||
|
if (Error)
|
||||||
{
|
{
|
||||||
/***** Show error message *****/
|
/***** Show error message *****/
|
||||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found);
|
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||||
|
|
||||||
/***** Request nickname again *****/
|
/***** Request nickname again *****/
|
||||||
Usr_RequestUserProfile ();
|
Usr_RequestUserProfile ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user