mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-31 05:45:24 +02:00
Version 15.88.2
This commit is contained in:
parent
375ef86888
commit
faf94c6a94
|
@ -117,13 +117,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.88.1 (2016-01-01)"
|
#define Log_PLATFORM_VERSION "SWAD 15.88.2 (2016-01-01)"
|
||||||
#define CSS_FILE "swad15.88.1.css"
|
#define CSS_FILE "swad15.88.1.css"
|
||||||
#define JS_FILE "swad15.77.7.js"
|
#define JS_FILE "swad15.77.7.js"
|
||||||
|
|
||||||
// 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 sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 15.88.2: Jan 01, 2016 Messages translated. (189902 lines)
|
||||||
Version 15.88.1: Jan 01, 2016 Changes in layout of social timeline. (189854 lines)
|
Version 15.88.1: Jan 01, 2016 Changes in layout of social timeline. (189854 lines)
|
||||||
Version 15.88: Jan 01, 2016 New buttons in social timeline to share/unshare a social publishing. (189841 lines)
|
Version 15.88: Jan 01, 2016 New buttons in social timeline to share/unshare a social publishing. (189841 lines)
|
||||||
2 changes necessary in database:
|
2 changes necessary in database:
|
||||||
|
|
|
@ -3136,7 +3136,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
if (NumStds + NumTchs)
|
if (NumStds + NumTchs)
|
||||||
{
|
{
|
||||||
Style = "DAT_N";
|
Style = "DAT_N";
|
||||||
StyleNoBR = "DAT_N_NOBR";
|
StyleNoBR = "DAT_NOBR_N";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -331,7 +331,7 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Start left list *****/
|
/***** Start left list *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"prf_fig_left_container\">"
|
fprintf (Gbl.F.Out,"<div id=\"prf_fig_left_container\">"
|
||||||
"<ul class=\"PRF_FIG_UL DAT_N_NOBR\">");
|
"<ul class=\"PRF_FIG_UL DAT_NOBR_N\">");
|
||||||
|
|
||||||
/***** Number of courses in which the user is teacher *****/
|
/***** Number of courses in which the user is teacher *****/
|
||||||
NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_TEACHER);
|
NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_TEACHER);
|
||||||
|
@ -415,7 +415,7 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Start left list *****/
|
/***** Start left list *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"prf_fig_right_container\">"
|
fprintf (Gbl.F.Out,"<div id=\"prf_fig_right_container\">"
|
||||||
"<ul class=\"PRF_FIG_UL DAT_N_NOBR\">");
|
"<ul class=\"PRF_FIG_UL DAT_NOBR_N\">");
|
||||||
|
|
||||||
UsrIsBannedFromRanking = Usr_CheckIfUsrBanned (UsrDat->UsrCod);
|
UsrIsBannedFromRanking = Usr_CheckIfUsrBanned (UsrDat->UsrCod);
|
||||||
if (!UsrIsBannedFromRanking)
|
if (!UsrIsBannedFromRanking)
|
||||||
|
|
|
@ -130,7 +130,7 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static unsigned long Soc_ShowTimeline (const char *Query,Act_Action_t UpdateAction);
|
static void Soc_ShowTimeline (const char *Query,Act_Action_t UpdateAction);
|
||||||
static void Soc_GetDataOfSocialPublishingFromRow (MYSQL_ROW row,struct SocialPublishing *SocPub);
|
static void Soc_GetDataOfSocialPublishingFromRow (MYSQL_ROW row,struct SocialPublishing *SocPub);
|
||||||
static void Soc_WriteSocialNote (const struct SocialPublishing *SocPub,
|
static void Soc_WriteSocialNote (const struct SocialPublishing *SocPub,
|
||||||
const struct SocialNote *SocNot,
|
const struct SocialNote *SocNot,
|
||||||
|
@ -188,59 +188,64 @@ void Soc_ShowUsrTimeline (long UsrCod)
|
||||||
|
|
||||||
void Soc_ShowFollowingTimeline (void)
|
void Soc_ShowFollowingTimeline (void)
|
||||||
{
|
{
|
||||||
|
extern const char *Txt_You_dont_follow_any_user;
|
||||||
char Query[512];
|
char Query[512];
|
||||||
|
|
||||||
/***** Link to write a new social post (public comment) *****/
|
/***** Link to write a new social post (public comment) *****/
|
||||||
if (Gbl.CurrentAct != ActReqSocPst)
|
if (Gbl.CurrentAct != ActReqSocPst)
|
||||||
Soc_PutLinkToWriteANewPost ();
|
Soc_PutLinkToWriteANewPost ();
|
||||||
|
|
||||||
/***** Show warning if I do not follow anyone *****/
|
/***** If I follow someone... *****/
|
||||||
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
if (Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
||||||
Lay_ShowAlert (Lay_INFO,"Usted no sigue a ningún usuario."); // Need translation!!!
|
{
|
||||||
|
/***** Create temporary table with publishing codes *****/
|
||||||
|
sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS pub_cods");
|
||||||
|
if (mysql_query (&Gbl.mysql,Query))
|
||||||
|
DB_ExitOnMySQLError ("can not remove temporary tables");
|
||||||
|
|
||||||
/***** Create temporary table with all the publishing codes *****/
|
sprintf (Query,"CREATE TEMPORARY TABLE pub_cods (PubCod BIGINT NOT NULL,UNIQUE INDEX(PubCod)) ENGINE=MEMORY"
|
||||||
sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS pub_cods");
|
" SELECT MIN(PubCod) AS PubCod"
|
||||||
if (mysql_query (&Gbl.mysql,Query))
|
" FROM social_timeline"
|
||||||
DB_ExitOnMySQLError ("can not remove temporary tables");
|
" WHERE PublisherCod IN"
|
||||||
|
" (SELECT '%ld'"
|
||||||
|
" UNION"
|
||||||
|
" SELECT FollowedCod FROM usr_follow WHERE FollowerCod='%ld')"
|
||||||
|
" GROUP BY NotCod"
|
||||||
|
" ORDER BY PubCod DESC LIMIT %u",
|
||||||
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
|
Soc_NUM_PUBS_IN_TIMELINE);
|
||||||
|
if (mysql_query (&Gbl.mysql,Query))
|
||||||
|
DB_ExitOnMySQLError ("can not create temporary table");
|
||||||
|
|
||||||
sprintf (Query,"CREATE TEMPORARY TABLE pub_cods (PubCod BIGINT NOT NULL,UNIQUE INDEX(PubCod)) ENGINE=MEMORY"
|
/***** Build query to show timeline including the users I am following *****/
|
||||||
" SELECT MIN(PubCod) AS PubCod"
|
sprintf (Query,"SELECT PubCod,AuthorCod,PublisherCod,NotCod,UNIX_TIMESTAMP(TimePublish)"
|
||||||
" FROM social_timeline"
|
" FROM social_timeline WHERE PubCod IN "
|
||||||
" WHERE PublisherCod IN"
|
"(SELECT PubCod FROM pub_cods)"
|
||||||
" (SELECT '%ld'"
|
" ORDER BY PubCod DESC");
|
||||||
" UNION"
|
|
||||||
" SELECT FollowedCod FROM usr_follow WHERE FollowerCod='%ld')"
|
|
||||||
" GROUP BY NotCod"
|
|
||||||
" ORDER BY PubCod DESC LIMIT %u",
|
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
|
||||||
Soc_NUM_PUBS_IN_TIMELINE);
|
|
||||||
if (mysql_query (&Gbl.mysql,Query))
|
|
||||||
DB_ExitOnMySQLError ("can not create temporary table");
|
|
||||||
|
|
||||||
/***** Build query to show timeline including the users I am following *****/
|
/***** Show timeline *****/
|
||||||
sprintf (Query,"SELECT PubCod,AuthorCod,PublisherCod,NotCod,UNIX_TIMESTAMP(TimePublish)"
|
Soc_ShowTimeline (Query,ActSeeSocAct);
|
||||||
" FROM social_timeline WHERE PubCod IN "
|
|
||||||
"(SELECT PubCod FROM pub_cods)"
|
|
||||||
" ORDER BY PubCod DESC");
|
|
||||||
|
|
||||||
/***** Show timeline *****/
|
/***** Drop temporary table with publishing codes *****/
|
||||||
if (!Soc_ShowTimeline (Query,ActSeeSocAct))
|
sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS pub_cods");
|
||||||
Lay_ShowAlert (Lay_INFO,"No hay actividad pública."); // Need translation!!!
|
if (mysql_query (&Gbl.mysql,Query))
|
||||||
|
DB_ExitOnMySQLError ("can not remove temporary tables");
|
||||||
sprintf (Query,"DROP TEMPORARY TABLE IF EXISTS pub_cods");
|
}
|
||||||
if (mysql_query (&Gbl.mysql,Query))
|
else // I do not follow anyone
|
||||||
DB_ExitOnMySQLError ("can not remove temporary tables");
|
/***** Show warning if I do not follow anyone *****/
|
||||||
|
Lay_ShowAlert (Lay_INFO,Txt_You_dont_follow_any_user);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********************** Show social activity (timeline) *********************/
|
/*********************** Show social activity (timeline) *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// UpdateAction == ActUnk ==> no form to update is displayed
|
// If UpdateAction == ActUnk ==> no form to update is displayed
|
||||||
|
|
||||||
static unsigned long Soc_ShowTimeline (const char *Query,Act_Action_t UpdateAction)
|
static void Soc_ShowTimeline (const char *Query,Act_Action_t UpdateAction)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Public_activity;
|
extern const char *Txt_Public_activity;
|
||||||
|
extern const char *Txt_No_public_activity;
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned long NumPublishings;
|
unsigned long NumPublishings;
|
||||||
|
@ -292,11 +297,11 @@ static unsigned long Soc_ShowTimeline (const char *Query,Act_Action_t UpdateActi
|
||||||
/***** Free memory used for user's data *****/
|
/***** Free memory used for user's data *****/
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
}
|
}
|
||||||
|
else // No publishing found in timeline
|
||||||
|
Lay_ShowAlert (Lay_INFO,Txt_No_public_activity);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
return NumPublishings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
42
swad_text.c
42
swad_text.c
|
@ -23877,6 +23877,27 @@ const char *Txt_No_of_users_who_will_be_notified_by_e_mail =
|
||||||
"Nº de utilizadores que serão notificados por e-mail";
|
"Nº de utilizadores que serão notificados por e-mail";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_No_public_activity =
|
||||||
|
#if L==1
|
||||||
|
"No hi ha activitat pública";
|
||||||
|
#elif L==2
|
||||||
|
"Keine öffentliche Aktivität";
|
||||||
|
#elif L==3
|
||||||
|
"No public activity";
|
||||||
|
#elif L==4
|
||||||
|
"No hay actividad pública";
|
||||||
|
#elif L==5
|
||||||
|
"Aucune activité public";
|
||||||
|
#elif L==6
|
||||||
|
"No hay actividad pública"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Nessuna attività pubblica";
|
||||||
|
#elif L==8
|
||||||
|
"Brak aktywność publiczne";
|
||||||
|
#elif L==9
|
||||||
|
"Sem atividade pública";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_No_questions_found_matching_your_search_criteria =
|
const char *Txt_No_questions_found_matching_your_search_criteria =
|
||||||
#if L==1
|
#if L==1
|
||||||
"No hay preguntas con el criterio de búsqueda seleccionado."; // Necessita traduccio
|
"No hay preguntas con el criterio de búsqueda seleccionado."; // Necessita traduccio
|
||||||
|
@ -50567,6 +50588,27 @@ const char *Txt_You_can_send_a_file_with_an_image_in_jpg_format_and_size_X_Y = /
|
||||||
" and size %u×%u pixels."; // Necessita de tradução
|
" and size %u×%u pixels."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_You_dont_follow_any_user =
|
||||||
|
#if L==1
|
||||||
|
"Vostè no segueix a cap usuari.";
|
||||||
|
#elif L==2
|
||||||
|
"Sie haben noch keine Benutzer folgen.";
|
||||||
|
#elif L==3
|
||||||
|
"You don't follow any user.";
|
||||||
|
#elif L==4
|
||||||
|
"Usted no sigue a ningún usuario.";
|
||||||
|
#elif L==5
|
||||||
|
"Vous ne suivez pas aucun utilisateur.";
|
||||||
|
#elif L==6
|
||||||
|
"Usted no sigue a ningún usuario."; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Non si seguono gli utenti.";
|
||||||
|
#elif L==8
|
||||||
|
"Nie po żadnej użytkownika.";
|
||||||
|
#elif L==9
|
||||||
|
"Você não segue nenhum usuário.";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_You_dont_have_permission_to_access_to_this_forum =
|
const char *Txt_You_dont_have_permission_to_access_to_this_forum =
|
||||||
#if L==1
|
#if L==1
|
||||||
"No té permís per accedir a aquest fòrum.";
|
"No té permís per accedir a aquest fòrum.";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user