diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-10-14 19:55:45 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-10-14 19:55:45 +0200 |
commit | 37b21a1b15c01de8390be3af74d1cf08f4676313 (patch) | |
tree | 2fb52e9ada90ec7f761d54d113b71b403e83a509 | |
parent | 154f4a0512f12e784544eafcacf0a69cba84855a (diff) | |
download | rpg-37b21a1b15c01de8390be3af74d1cf08f4676313.tar.gz rpg-37b21a1b15c01de8390be3af74d1cf08f4676313.tar.bz2 |
use its own cache file per versions
this ensures there will be never, ever an outdated update message shown
after upgrade.
-rw-r--r-- | inc/infoutils.php | 6 |
1 files changed, 3 insertions, 3 deletions
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); |