mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-02 14:55:23 +02:00
Version 14.81
This commit is contained in:
parent
d708d0d0a3
commit
d3afaf9101
|
@ -103,12 +103,13 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.80.19 (2015/03/09)"
|
#define Log_PLATFORM_VERSION "SWAD 14.81 (2015/03/09)"
|
||||||
|
|
||||||
// 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.80.19: Mar 09, 2015 Fixed bug in web service, reported by Juan Miguel Boyero. (179482 lines)
|
Version 14.81: Mar 09, 2015 Information about number of forum posts in user's public profile. (179512 lines)
|
||||||
|
Version 14.80.19: Mar 09, 2015 Fixed bug in web service, reported by Juan Miguel Boyero Corral. (179482 lines)
|
||||||
Version 14.80.18: Mar 09, 2015 Fixed bug in statistic of degrees and courses. (179481 lines)
|
Version 14.80.18: Mar 09, 2015 Fixed bug in statistic of degrees and courses. (179481 lines)
|
||||||
Version 14.80.17: Mar 09, 2015 Scope country for statistic of users. (179480 lines)
|
Version 14.80.17: Mar 09, 2015 Scope country for statistic of users. (179480 lines)
|
||||||
Version 14.80.16: Mar 09, 2015 Scope country for statistic of degrees and courses. (179439 lines)
|
Version 14.80.16: Mar 09, 2015 Scope country for statistic of degrees and courses. (179439 lines)
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
/** Uncomment one of the following installations of SWAD or create your own **/
|
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||||
#define OPENSWAD_ORG // Comment this line if not applicable
|
//#define OPENSWAD_ORG // Comment this line if not applicable
|
||||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
//#define SWAD_UGR_ES // Comment this line if not applicable
|
||||||
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
|
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
|
||||||
|
|
||||||
|
|
21
swad_forum.c
21
swad_forum.c
|
@ -757,7 +757,8 @@ unsigned For_GetNumPstsInThr (long ThrCod)
|
||||||
char Query[512];
|
char Query[512];
|
||||||
|
|
||||||
/***** Get number of posts in a thread from database *****/
|
/***** Get number of posts in a thread from database *****/
|
||||||
sprintf (Query,"SELECT COUNT(*) FROM forum_post WHERE ThrCod='%ld'",ThrCod);
|
sprintf (Query,"SELECT COUNT(*) FROM forum_post WHERE ThrCod='%ld'",
|
||||||
|
ThrCod);
|
||||||
return (unsigned) DB_QueryCOUNT (Query,"can not get the number of posts in a thread of a forum");
|
return (unsigned) DB_QueryCOUNT (Query,"can not get the number of posts in a thread of a forum");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,15 +768,29 @@ unsigned For_GetNumPstsInThr (long ThrCod)
|
||||||
|
|
||||||
unsigned For_GetNumMyPstInThr (long ThrCod)
|
unsigned For_GetNumMyPstInThr (long ThrCod)
|
||||||
{
|
{
|
||||||
char Query[512];
|
char Query[128];
|
||||||
|
|
||||||
/***** Get if I have write posts in a thread from database *****/
|
/***** Get if I have write posts in a thread from database *****/
|
||||||
sprintf (Query,"SELECT COUNT(*) FROM forum_post"
|
sprintf (Query,"SELECT COUNT(*) FROM forum_post"
|
||||||
" WHERE forum_post.ThrCod='%ld' AND forum_post.UsrCod='%ld'",
|
" WHERE ThrCod='%ld' AND UsrCod='%ld'",
|
||||||
ThrCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
ThrCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
return (unsigned) DB_QueryCOUNT (Query,"can not check if you have written post in a thead of a forum");
|
return (unsigned) DB_QueryCOUNT (Query,"can not check if you have written post in a thead of a forum");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********************** Get number of posts from a user *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
unsigned For_GetNumPostsUsr (long UsrCod)
|
||||||
|
{
|
||||||
|
char Query[128];
|
||||||
|
|
||||||
|
/***** Get number of posts from a user from database *****/
|
||||||
|
sprintf (Query,"SELECT COUNT(*) FROM forum_post WHERE UsrCod='%ld'",
|
||||||
|
UsrCod);
|
||||||
|
return (unsigned) DB_QueryCOUNT (Query,"can not number of posts from a user");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************** Get thread read time for the current user ****************/
|
/****************** Get thread read time for the current user ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -110,6 +110,7 @@ unsigned For_GetNumOfReadersOfThr (long ThrCod);
|
||||||
unsigned For_GetNumOfWritersInThr (long ThrCod);
|
unsigned For_GetNumOfWritersInThr (long ThrCod);
|
||||||
unsigned For_GetNumPstsInThr (long ThrCod);
|
unsigned For_GetNumPstsInThr (long ThrCod);
|
||||||
unsigned For_GetNumMyPstInThr (long ThrCod);
|
unsigned For_GetNumMyPstInThr (long ThrCod);
|
||||||
|
unsigned For_GetNumPostsUsr (long UsrCod);
|
||||||
void For_GetThrReadTime (long ThrCod,char *ReadTime);
|
void For_GetThrReadTime (long ThrCod,char *ReadTime);
|
||||||
void For_DeleteThrFromReadThrs (long ThrCod);
|
void For_DeleteThrFromReadThrs (long ThrCod);
|
||||||
void For_RemoveUsrFromReadThrs (long UsrCod);
|
void For_RemoveUsrFromReadThrs (long UsrCod);
|
||||||
|
|
|
@ -11759,17 +11759,17 @@ const char *Txt_Forum =
|
||||||
|
|
||||||
const char *Txt_Forum_posts =
|
const char *Txt_Forum_posts =
|
||||||
#if L==0
|
#if L==0
|
||||||
"Mensajes de foro"; // Necessita traduccio
|
"Mensajes en foros"; // Necessita traduccio
|
||||||
#elif L==1
|
#elif L==1
|
||||||
"Forum-Beiträge";
|
"Forum-Beiträge";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Forum posts";
|
"Forum posts";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"Mensajes de foro";
|
"Mensajes en foros";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"Messages de forum";
|
"Messages de forum";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"Mensajes de foro"; // Okoteve traducción
|
"Mensajes en foros"; // Okoteve traducción
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Post del forum";
|
"Post del forum";
|
||||||
#elif L==7
|
#elif L==7
|
||||||
|
|
19
swad_user.c
19
swad_user.c
|
@ -7464,7 +7464,7 @@ void Usr_ShowUserProfile (void)
|
||||||
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
|
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
/***** Show details of user's profile *****/
|
/***** Show details of user's profile *****/
|
||||||
// Usr_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat);
|
Usr_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
@ -7520,6 +7520,7 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
extern const char *The_ClassFormul[The_NUM_THEMES];
|
extern const char *The_ClassFormul[The_NUM_THEMES];
|
||||||
extern const char *Txt_Shortcut;
|
extern const char *Txt_Shortcut;
|
||||||
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
|
extern const char *Txt_Forum_posts;
|
||||||
|
|
||||||
/***** Start table *****/
|
/***** Start table *****/
|
||||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||||
|
@ -7542,6 +7543,22 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
|
||||||
|
|
||||||
|
/***** Number of posts in forums *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"%s\""
|
||||||
|
" style=\"text-align:right; vertical-align:middle;\">"
|
||||||
|
"%s:"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"DAT\""
|
||||||
|
" style=\"text-align:left; vertical-align:middle;\">"
|
||||||
|
"%u"
|
||||||
|
"</a>"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
|
Txt_Forum_posts,
|
||||||
|
For_GetNumPostsUsr (UsrDat->UsrCod));
|
||||||
|
|
||||||
/***** End of table *****/
|
/***** End of table *****/
|
||||||
Lay_EndRoundFrameTable10 ();
|
Lay_EndRoundFrameTable10 ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user