diff options
author | Anika Henke <anika@selfthinker.org> | 2010-06-27 13:58:07 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2010-06-27 13:58:07 +0100 |
commit | ef362bb863eb95d3968a3a1df35562914a1bbdef (patch) | |
tree | da5186d50fb6e0c7a0b17d340130e715f89ed973 /inc | |
parent | 4691241902c0cfa175d06bb454e9147e25b9b21a (diff) | |
download | rpg-ef362bb863eb95d3968a3a1df35562914a1bbdef.tar.gz rpg-ef362bb863eb95d3968a3a1df35562914a1bbdef.tar.bz2 |
moved update message from its own file (conf/msg) into doku.php (FS#1800)
Diffstat (limited to 'inc')
-rw-r--r-- | inc/infoutils.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php index 87b29d7af..ac6a0a84c 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -16,6 +16,7 @@ if(!defined('DOKU_MESSAGEURL')) define('DOKU_MESSAGEURL','http://update.dokuwiki function checkUpdateMessages(){ global $conf; global $INFO; + global $updateVersion; if(!$conf['updatecheck']) return; if($conf['useacl'] && !$INFO['ismanager']) return; @@ -23,12 +24,10 @@ function checkUpdateMessages(){ $lm = @filemtime($cf); // check if new messages needs to be fetched - if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_CONF.'msg')){ - $num = @file(DOKU_CONF.'msg'); - $num = is_array($num) ? (int) $num[0] : 0; + if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.'doku.php')){ $http = new DokuHTTPClient(); $http->timeout = 8; - $data = $http->get(DOKU_MESSAGEURL.$num); + $data = $http->get(DOKU_MESSAGEURL.$updateVersion); io_saveFile($cf,$data); }else{ $data = io_readFile($cf); |