Version 16.17.8

This commit is contained in:
Antonio Cañas Vargas 2016-10-08 23:50:01 +02:00
parent edd59547d2
commit 890f14bc34
2 changed files with 10 additions and 11 deletions

View File

@ -148,13 +148,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.17.7 (2016-10-08)" #define Log_PLATFORM_VERSION "SWAD 16.17.8 (2016-10-08)"
#define CSS_FILE "swad15.229.css" #define CSS_FILE "swad15.229.css"
#define JS_FILE "swad15.238.1.js" #define JS_FILE "swad15.238.1.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 16.17.8: Oct 08, 2016 Code refactoring in user's usage report. (206289 lines)
Version 16.17.7: Oct 08, 2016 Code refactoring in user's usage report. (206290 lines) Version 16.17.7: Oct 08, 2016 Code refactoring in user's usage report. (206290 lines)
Version 16.17.6: Oct 08, 2016 Code refactoring in user's usage report. (206291 lines) Version 16.17.6: Oct 08, 2016 Code refactoring in user's usage report. (206291 lines)
Version 16.17.5: Oct 08, 2016 Code refactoring in user's usage report. (206301 lines) Version 16.17.5: Oct 08, 2016 Code refactoring in user's usage report. (206301 lines)

View File

@ -108,8 +108,7 @@ static void Req_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC);
static void Rep_GetCurrentDateTimeUTC (struct Rep_Report *Report); static void Rep_GetCurrentDateTimeUTC (struct Rep_Report *Report);
static void Rep_CreateNewReportFile (const struct Rep_CurrentTimeUTC *CurrentTimeUTC, static void Rep_CreateNewReportFile (struct Rep_Report *Report);
char *FilenameReport,char *Permalink);
static void Rep_CreateNewReportEntryIntoDB (const struct tm *tm_CurrentTime, static void Rep_CreateNewReportEntryIntoDB (const struct tm *tm_CurrentTime,
const char *FilenameReport, const char *FilenameReport,
const char *Permalink); const char *Permalink);
@ -216,7 +215,7 @@ static void Rep_CreateMyUsageReport (struct Rep_Report *Report)
Rep_GetCurrentDateTimeUTC (Report); Rep_GetCurrentDateTimeUTC (Report);
/***** Create a new report file *****/ /***** Create a new report file *****/
Rep_CreateNewReportFile (&Report->CurrentTimeUTC,Report->FilenameReport,Report->Permalink); Rep_CreateNewReportFile (Report);
/***** Store report entry into database *****/ /***** Store report entry into database *****/
Rep_CreateNewReportEntryIntoDB (&Report->tm_CurrentTime,Report->FilenameReport,Report->Permalink); Rep_CreateNewReportEntryIntoDB (&Report->tm_CurrentTime,Report->FilenameReport,Report->Permalink);
@ -374,8 +373,7 @@ static void Rep_GetCurrentDateTimeUTC (struct Rep_Report *Report)
/*************** Create a new file for user's usage report *******************/ /*************** Create a new file for user's usage report *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Rep_CreateNewReportFile (const struct Rep_CurrentTimeUTC *CurrentTimeUTC, static void Rep_CreateNewReportFile (struct Rep_Report *Report)
char *FilenameReport,char *Permalink)
{ {
char PathReports[PATH_MAX+1]; char PathReports[PATH_MAX+1];
char PathUniqueDirL[PATH_MAX+1]; char PathUniqueDirL[PATH_MAX+1];
@ -403,21 +401,21 @@ static void Rep_CreateNewReportFile (const struct Rep_CurrentTimeUTC *CurrentTim
Lay_ShowErrorAndExit ("Can not create directory for report."); Lay_ShowErrorAndExit ("Can not create directory for report.");
/***** Path of the public file with the report */ /***** Path of the public file with the report */
sprintf (FilenameReport,"%s_%06u_%06u.html", sprintf (Report->FilenameReport,"%s_%06u_%06u.html",
Rep_FILENAME_ROOT,CurrentTimeUTC->Date,CurrentTimeUTC->Time); Rep_FILENAME_ROOT,Report->CurrentTimeUTC.Date,Report->CurrentTimeUTC.Time);
sprintf (PathFileReport,"%s/%s", sprintf (PathFileReport,"%s/%s",
PathUniqueDirR,FilenameReport); PathUniqueDirR,Report->FilenameReport);
if ((Gbl.F.Rep = fopen (PathFileReport,"wb")) == NULL) if ((Gbl.F.Rep = fopen (PathFileReport,"wb")) == NULL)
Lay_ShowErrorAndExit ("Can not create report file."); Lay_ShowErrorAndExit ("Can not create report file.");
/***** Permalink *****/ /***** Permalink *****/
sprintf (Permalink,"%s/%s/%c%c/%s/%s", sprintf (Report->Permalink,"%s/%s/%c%c/%s/%s",
Cfg_URL_SWAD_PUBLIC, Cfg_URL_SWAD_PUBLIC,
Cfg_FOLDER_REP, Cfg_FOLDER_REP,
Gbl.UniqueNameEncrypted[0], Gbl.UniqueNameEncrypted[0],
Gbl.UniqueNameEncrypted[1], Gbl.UniqueNameEncrypted[1],
&Gbl.UniqueNameEncrypted[2], &Gbl.UniqueNameEncrypted[2],
FilenameReport); Report->FilenameReport);
} }
/*****************************************************************************/ /*****************************************************************************/