From 378cc4de2f8475a52ab0e239e996a7f9458bc1e9 Mon Sep 17 00:00:00 2001 From: acanas Date: Fri, 1 May 2020 19:32:57 +0200 Subject: [PATCH] Version19.208.1 --- swad_changelog.h | 5 +++-- swad_figure_cache.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index f5954185f..9d824c428 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -544,11 +544,12 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.208 (2020-05-01)" +#define Log_PLATFORM_VERSION "SWAD 19.208.1 (2020-05-01)" #define CSS_FILE "swad19.193.1.css" #define JS_FILE "swad19.193.1.js" /* - Version 19.208: May 01, 2020 Optimization in table of last prefs on user-course. (300598 lines) + Version 19.208.1: May 01, 2020 Fixed bug in cache of figures. (300599 lines) + Version 19.208: May 01, 2020 New module for cache of figures. (300598 lines) 1 change necessary in database: CREATE TABLE IF NOT EXISTS figures (Figure INT NOT NULL,Scope ENUM('Sys','Cty','Ins','Ctr','Deg','Crs') NOT NULL DEFAULT 'Sys',Cod INT NOT NULL DEFAULT -1,Value INT NOT NULL,LastUpdate TIMESTAMP,UNIQUE INDEX(Figure,Scope,Cod)); If you want to use MyISAM: diff --git a/swad_figure_cache.c b/swad_figure_cache.c index ba8d6bbec..e9edf5835 100644 --- a/swad_figure_cache.c +++ b/swad_figure_cache.c @@ -103,7 +103,7 @@ bool FigCch_GetFigureFromCache (FigCch_FigureCached_t Figure, "SELECT Value" " FROM figures" " WHERE Figure=%u AND Scope='%s' AND Cod=%ld" - " AND LastUpdateFROM_UNIXTIME(UNIX_TIMESTAMP()-%lu)", (unsigned) Figure,Sco_GetDBStrFromScope (Scope),Cod, FigCch_TIME_CACHE)) {