From dc2e1dc0817f0818943647d6b005ea35683c9c1b Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 28 Nov 2013 16:37:27 +0100 Subject: Annulation du cache via no-cache.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La présence du fichier DATA_PATH/no-cache.txt permet de désactiver le cache. Ce fichier n'est pas présent par défaut Corrige #297 --- public/index.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'public') diff --git a/public/index.php b/public/index.php index 9d1ee711c..9bf4fc073 100755 --- a/public/index.php +++ b/public/index.php @@ -24,14 +24,16 @@ if (file_exists ('install.php')) { require('../constants.php'); session_cache_limiter(''); - require (LIB_PATH . '/http-conditional.php'); - $dateLastModification = max( - @filemtime(DATA_PATH . '/touch.txt') - 1, - @filemtime(LOG_PATH . '/application.log') - 1, - @filemtime(DATA_PATH . '/application.ini') - 1 - ); - if (httpConditional($dateLastModification, 0, 0, false, false, true)) { - exit(); //No need to send anything + if (!file_exists(DATA_PATH . '/no-cache.txt')) { + require (LIB_PATH . '/http-conditional.php'); + $dateLastModification = max( + @filemtime(DATA_PATH . '/touch.txt') - 1, + @filemtime(LOG_PATH . '/application.log') - 1, + @filemtime(DATA_PATH . '/application.ini') - 1 + ); + if (httpConditional($dateLastModification, 0, 0, false, false, true)) { + exit(); //No need to send anything + } } set_include_path (get_include_path () -- cgit v1.2.3