From 05e9e6464f161ffe613abc808387b116a1434e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 14 Feb 2019 13:22:11 +0100 Subject: [PATCH] Version 18.41.5 --- swad_changelog.h | 3 +- swad_help_URL.c | 4 +- swad_mail.c | 20 --------- swad_mail.h | 1 - swad_text.c | 103 ++++++++++++++++++++++++++++------------------- swad_user.c | 50 ++++++++++++++++------- 6 files changed, 102 insertions(+), 79 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index e0d967f92..3523f4977 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -384,10 +384,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.41.4 (2019-02-14)" +#define Log_PLATFORM_VERSION "SWAD 18.41.5 (2019-02-14)" #define CSS_FILE "swad18.41.1.css" #define JS_FILE "swad18.32.1.js" /* + Version 18.41.5: Feb 14, 2019 Changes in welcome alert. (239256 lines) Version 18.41.4: Feb 14, 2019 By default, timeline now shows all users. (239229 lines) Version 18.41.3: Feb 14, 2019 Chat is temporarily disabled because modern browsers don't allow Java. (239228 lines) Version 18.41.2: Feb 14, 2019 Change in layout of attendance list. diff --git a/swad_help_URL.c b/swad_help_URL.c index 60335a928..a32c7a64b 100644 --- a/swad_help_URL.c +++ b/swad_help_URL.c @@ -3205,7 +3205,7 @@ const char *Hlp_PROFILE_Account = #elif L==9 "PROFILE.Account.en"; #endif - +/* const char *Hlp_PROFILE_Account_email = #if L==1 "PROFILE.Account.es#correo"; @@ -3226,7 +3226,7 @@ const char *Hlp_PROFILE_Account_email = #elif L==9 "PROFILE.Account.en#email"; #endif - +*/ const char *Hlp_PROFILE_Session_role = #if L==1 "PROFILE.Session.es#rol"; diff --git a/swad_mail.c b/swad_mail.c index e2c384522..984a0e4f8 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -1658,26 +1658,6 @@ bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char NewEmail[Cns_M return true; // Successfully updated } -/*****************************************************************************/ -/********** Put button to go to check and confirm my email address ***********/ -/*****************************************************************************/ - -void Mai_PutButtonToCheckEmailAddress (void) - { - extern const char *Hlp_PROFILE_Account_email; - extern const char *Txt_Email_unconfirmed; - extern const char *Txt_Please_confirm_your_email_address; - extern const char *Txt_Check; - - /***** Box with button to check email address *****/ - Box_StartBox (NULL,Txt_Email_unconfirmed,NULL, - Hlp_PROFILE_Account_email,Box_CLOSABLE); - Ale_ShowAlertAndButton (Ale_WARNING,Txt_Please_confirm_your_email_address, - ActFrmMyAcc,NULL,NULL,NULL, - Btn_CONFIRM_BUTTON,Txt_Check); - Box_EndBox (); - } - /*****************************************************************************/ /************** Send mail message to confirm my email address ****************/ /*****************************************************************************/ diff --git a/swad_mail.h b/swad_mail.h index 9c1dcb9f3..ce87cd249 100644 --- a/swad_mail.h +++ b/swad_mail.h @@ -86,7 +86,6 @@ void May_NewMyUsrEmail (void); void Mai_NewOtherUsrEmail (void); bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]); -void Mai_PutButtonToCheckEmailAddress (void); bool Mai_SendMailMsgToConfirmEmail (void); void Mai_ConfirmEmail (void); diff --git a/swad_text.c b/swad_text.c index 3fc2b06f4..c3ecee2e8 100644 --- a/swad_text.c +++ b/swad_text.c @@ -10340,7 +10340,7 @@ const char *Txt_Email_X_removed = // Warning: it is very important to include %s #elif L==9 // pt "Email %s removido."; #endif - +/* const char *Txt_Email_unconfirmed = #if L==1 // ca "Correo no confirmado"; // Necessita traduccio @@ -10361,7 +10361,7 @@ const char *Txt_Email_unconfirmed = #elif L==9 // pt "Email não confirmado"; #endif - +*/ const char *Txt_End_date = #if L==1 // ca "Data final"; @@ -28938,11 +28938,32 @@ const char *Txt_Play = // To play a game "Jogar"; #endif +const char *Txt_Please_check_your_email_address = +#if L==1 // ca + "Si us plau, comproveu la seva adreça de correu."; +#elif L==2 // de + "Bitte überprüfen Ihre E-Mail-Adresse."; +#elif L==3 // en + "Please check your email address."; +#elif L==4 // es + "Por favor, compruebe su dirección de correo."; +#elif L==5 // fr + "S'il vous plaít, v&eaxcute;rifiez votre adresse email."; +#elif L==6 // gn + "Por favor, compruebe su dirección de correo."; // Okoteve traducción +#elif L==7 // it + "Per favore, verifica il tuo indirizzo email."; +#elif L==8 // pl + "Proszę sprawdź swój adres email."; +#elif L==9 // pt + "Por favor, verifique seu endereço de email."; +#endif + const char *Txt_Please_confirm_your_email_address = #if L==1 // ca "Si us plau, confirmeu la seva adreça de correu."; #elif L==2 // de - "Bitte Ihre E-Mail-Adresse bestätigen."; + "Bitte bestätige Ihre E-Mail-Adressen."; #elif L==3 // en "Please confirm your email address."; #elif L==4 // es @@ -28956,7 +28977,7 @@ const char *Txt_Please_confirm_your_email_address = #elif L==8 // pl "Proszę potwierdzić swój adres email."; #elif L==9 // pt - "Por favor, confirmar o seu endereço de email."; + "Por favor, confirme seu endereço de email."; #endif const char *Txt_Please_enter_your_ID = @@ -52942,86 +52963,86 @@ const char *Txt_Welcome_X[Usr_NUM_SEXS] = // Warning: it is very important to in #endif }; -const char *Txt_Welcome_X_and_happy_birthday[Usr_NUM_SEXS] = // Warning: it is very important to include %s in the following sentences +const char *Txt_Welcome_X_happy_birthday[Usr_NUM_SEXS] = // Warning: it is very important to include %s in the following sentences { #if L==1 // ca // Usr_SEX_UNKNOWN - "Benvingut/da, %s, i feliç aniversari!" + "Benvingut/da, %s, feliç aniversari!" #elif L==2 // de - "Willkommen, %s, und alles Gute zum Geburtstag!" + "Willkommen, %s, alles Gute zum Geburtstag!" #elif L==3 // en - "Welcome, %s, and happy birthday!" + "Welcome, %s, happy birthday!" #elif L==4 // es - "Bienvenido/a, %s, ¡y feliz cumpleaños!" + "Bienvenido/a, %s, ¡feliz cumpleaños!" #elif L==5 // fr - "Bienvenu(e), %s, et joyeux anniversaire!" + "Bienvenu(e), %s, joyeux anniversaire!" #elif L==6 // gn - "Bienvenido/a, %s, ¡y feliz cumpleaños!"// Okoteve traducción + "Bienvenido/a, %s, ¡feliz cumpleaños!"// Okoteve traducción #elif L==7 // it - "Benvenuto/a, %s, e buon compleanno!" + "Benvenuto/a, %s, buon compleanno!" #elif L==8 // pl - "Witamy, %s, i wszystkiego najlepszego!" + "Witamy, %s, wszystkiego najlepszego!" #elif L==9 // pt - "Bem-vindo/a, %s, e feliz aniversário!" + "Bem-vindo/a, %s, feliz aniversário!" #endif , #if L==1 // ca // Usr_SEX_FEMALE - "Benvinguda, %s, i feliç aniversari!" + "Benvinguda, %s, feliç aniversari!" #elif L==2 // de - "Willkommen, %s, und alles Gute zum Geburtstag!" + "Willkommen, %s, alles Gute zum Geburtstag!" #elif L==3 // en - "Welcome, %s, and happy birthday!" + "Welcome, %s, happy birthday!" #elif L==4 // es - "Bienvenida, %s, ¡y feliz cumpleaños!" + "Bienvenida, %s, ¡feliz cumpleaños!" #elif L==5 // fr - "Bienvenue, %s, et joyeux anniversaire!" + "Bienvenue, %s, joyeux anniversaire!" #elif L==6 // gn - "Bienvenida, %s, ¡y feliz cumpleaños!"// Okoteve traducción + "Bienvenida, %s, ¡feliz cumpleaños!"// Okoteve traducción #elif L==7 // it - "Benvenuta, %s, e buon compleanno!" + "Benvenuta, %s, buon compleanno!" #elif L==8 // pl - "Witamy, %s, i wszystkiego najlepszego!" + "Witamy, %s, wszystkiego najlepszego!" #elif L==9 // pt - "Bem-vinda, %s, e feliz aniversário!" + "Bem-vinda, %s, feliz aniversário!" #endif , #if L==1 // ca // Usr_SEX_MALE - "Benvingut, %s, i feliç aniversari!" + "Benvingut, %s, feliç aniversari!" #elif L==2 // de - "Willkommen, %s, und alles Gute zum Geburtstag!" + "Willkommen, %s, alles Gute zum Geburtstag!" #elif L==3 // en - "Welcome, %s, and happy birthday!" + "Welcome, %s, happy birthday!" #elif L==4 // es - "Bienvenido, %s, ¡y feliz cumpleaños!" + "Bienvenido, %s, ¡feliz cumpleaños!" #elif L==5 // fr - "Bienvenu, %s, et joyeux anniversaire!" + "Bienvenu, %s, joyeux anniversaire!" #elif L==6 // gn - "Bienvenido, %s, ¡y feliz cumpleaños!"// Okoteve traducción + "Bienvenido, %s, ¡feliz cumpleaños!"// Okoteve traducción #elif L==7 // it - "Benvenuto, %s, e buon compleanno!" + "Benvenuto, %s, buon compleanno!" #elif L==8 // pl - "Witamy, %s, i wszystkiego najlepszego!" + "Witamy, %s, wszystkiego najlepszego!" #elif L==9 // pt - "Bem-vindo, %s, e feliz aniversário!" + "Bem-vindo, %s, feliz aniversário!" #endif , #if L==1 // ca // Usr_SEX_ALL - "Benvingut/da, %s, i feliç aniversari!" + "Benvingut/da, %s, feliç aniversari!" #elif L==2 // de - "Willkommen, %s, und alles Gute zum Geburtstag!" + "Willkommen, %s, alles Gute zum Geburtstag!" #elif L==3 // en - "Welcome, %s, and happy birthday!" + "Welcome, %s, happy birthday!" #elif L==4 // es - "Bienvenido/a, %s, ¡y feliz cumpleaños!" + "Bienvenido/a, %s, ¡feliz cumpleaños!" #elif L==5 // fr - "Bienvenu(e), %s, et joyeux anniversaire!" + "Bienvenu(e), %s, joyeux anniversaire!" #elif L==6 // gn - "Bienvenido/a, %s, ¡y feliz cumpleaños!"// Okoteve traducción + "Bienvenido/a, %s, ¡feliz cumpleaños!"// Okoteve traducción #elif L==7 // it - "Benvenuto/a, %s, e buon compleanno!" + "Benvenuto/a, %s, buon compleanno!" #elif L==8 // pl - "Witamy, %s, i wszystkiego najlepszego!" + "Witamy, %s, wszystkiego najlepszego!" #elif L==9 // pt - "Bem-vindo/a, %s, e feliz aniversário!" + "Bem-vindo/a, %s, feliz aniversário!" #endif }; diff --git a/swad_user.c b/swad_user.c index eb7e8a9ed..7d25449ab 100644 --- a/swad_user.c +++ b/swad_user.c @@ -25,10 +25,12 @@ /*********************************** Headers *********************************/ /*****************************************************************************/ +#define _GNU_SOURCE // For asprintf #include // For isalnum, isdigit, etc. #include // For maximum values #include // For PATH_MAX #include // For NULL +#include // For asprintf #include // For exit, system, malloc, free, rand, etc. #include // For string functions #include // For the macro WEXITSTATUS @@ -2507,14 +2509,21 @@ void Usr_WelcomeUsr (void) { extern const unsigned Txt_Current_CGI_SWAD_Language; extern const char *Txt_Happy_birthday; - extern const char *Txt_Welcome_X_and_happy_birthday[Usr_NUM_SEXS]; + extern const char *Txt_Welcome_X_happy_birthday[Usr_NUM_SEXS]; extern const char *Txt_Welcome_X[Usr_NUM_SEXS]; extern const char *Txt_Welcome[Usr_NUM_SEXS]; + extern const char *Txt_Please_check_your_email_address; + extern const char *Txt_Check; extern const char *Txt_Switching_to_LANGUAGE[1 + Lan_NUM_LANGUAGES]; + char *WelcomeTxt; + bool EmailNeedsToBeConfirmed; bool CongratulateMyBirthday; if (Gbl.Usrs.Me.Logged) { + EmailNeedsToBeConfirmed = (Gbl.Usrs.Me.UsrDat.Email[0] && + !Gbl.Usrs.Me.UsrDat.EmailConfirmed); + if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Txt_Current_CGI_SWAD_Language) { fprintf (Gbl.F.Out,"
"); */ - /***** Warning to confirm my email address *****/ - if (Gbl.Usrs.Me.UsrDat.Email[0] && - !Gbl.Usrs.Me.UsrDat.EmailConfirmed) - Mai_PutButtonToCheckEmailAddress (); - /***** Show help to enrol me *****/ - Hlp_ShowHelpWhatWouldYouLikeToDo (); + // Hlp_ShowHelpWhatWouldYouLikeToDo (); fprintf (Gbl.F.Out,"
");