From 37b21a1b15c01de8390be3af74d1cf08f4676313 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 14 Oct 2014 19:55:45 +0200 Subject: use its own cache file per versions this ensures there will be never, ever an outdated update message shown after upgrade. --- inc/infoutils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/infoutils.php') diff --git a/inc/infoutils.php b/inc/infoutils.php index e2b64d3ca..8fe344093 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -20,13 +20,13 @@ function checkUpdateMessages(){ if(!$conf['updatecheck']) return; if($conf['useacl'] && !$INFO['ismanager']) return; - $cf = $conf['cachedir'].'/messages.txt'; + $cf = getCacheName($updateVersion, '.updmsg'); $lm = @filemtime($cf); // check if new messages needs to be fetched if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){ @touch($cf); - dbglog("checkUpdateMessages(): downloading messages.txt"); + dbglog("checkUpdateMessages(): downloading messages to ".$cf); $http = new DokuHTTPClient(); $http->timeout = 12; $resp = $http->get(DOKU_MESSAGEURL.$updateVersion); @@ -38,7 +38,7 @@ function checkUpdateMessages(){ dbglog("checkUpdateMessages(): unexpected HTTP response received"); } }else{ - dbglog("checkUpdateMessages(): messages.txt up to date"); + dbglog("checkUpdateMessages(): messages up to date"); } $data = io_readFile($cf); -- cgit v1.2.3