diff --git a/swad_changelog.h b/swad_changelog.h index ed8bd2df7..28f8e68b8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202.2 (2016-04-23)" +#define Log_PLATFORM_VERSION "SWAD 15.202.3 (2016-04-23)" #define CSS_FILE "swad15.202.css" #define JS_FILE "swad15.197.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 15.202.3: Apr 23, 2016 Code refactoring in record card. (200911 lines) Version 15.202.2: Apr 23, 2016 Code refactoring in record card. (200899 lines) Version 15.202.1: Apr 23, 2016 Code refactoring related to showing user's e-mail. (200887 lines) Version 15.202: Apr 23, 2016 User's IDs are show in green or red. diff --git a/swad_record.c b/swad_record.c index d2b32e109..df16b8c3f 100644 --- a/swad_record.c +++ b/swad_record.c @@ -103,6 +103,9 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat, Rec_RecordViewType_t TypeOfView, bool DataForm, const char *ClassForm); +static void Rec_ShowSurname2 (struct UsrData *UsrDat, + bool DataForm, + const char *ClassForm); static void Rec_WriteLinkToDataProtectionClause (void); @@ -1965,7 +1968,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, struct UsrData *UsrDat) { extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Surname_2; extern const char *Txt_First_name; extern const char *Txt_Country; extern const char *Txt_Another_country; @@ -2116,28 +2118,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, Rec_ShowSurname1 (UsrDat,TypeOfView,DataForm,ClassForm); /* Surname 2 */ - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - ClassForm,Rec_C1_BOTTOM, - Txt_Surname_2, - Rec_C2_BOTTOM); - if (DataForm) - fprintf (Gbl.F.Out,"", - Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, - UsrDat->Surname2, - Rec_C2_BOTTOM - 20); - else if (UsrDat->Surname2[0]) - fprintf (Gbl.F.Out,"%s", - UsrDat->Surname2); - fprintf (Gbl.F.Out,"" - ""); + Rec_ShowSurname2 (UsrDat,DataForm,ClassForm); /* First name */ fprintf (Gbl.F.Out,"" @@ -3261,6 +3242,40 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat, ""); } + +/*****************************************************************************/ +/*************************** Show user's surname 1 ***************************/ +/*****************************************************************************/ + +static void Rec_ShowSurname2 (struct UsrData *UsrDat, + bool DataForm, + const char *ClassForm) + { + extern const char *Txt_Surname_2; + + fprintf (Gbl.F.Out,"" + "" + "%s:" + "" + "", + ClassForm,Rec_C1_BOTTOM, + Txt_Surname_2, + Rec_C2_BOTTOM); + if (DataForm) + fprintf (Gbl.F.Out,"", + Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, + UsrDat->Surname2, + Rec_C2_BOTTOM - 20); + else if (UsrDat->Surname2[0]) + fprintf (Gbl.F.Out,"%s",UsrDat->Surname2); + fprintf (Gbl.F.Out,"" + ""); + } + /*****************************************************************************/ /*********************** Write a link to netiquette rules ********************/ /*****************************************************************************/