sanity check update message
This should avoid problems when a WiFi login redirect intercepts the update check. See https://forum.dokuwiki.org/post/45076
This commit is contained in:
parent
75eee04265
commit
8f1efc437b
|
@ -30,7 +30,12 @@ function checkUpdateMessages(){
|
|||
$http = new DokuHTTPClient();
|
||||
$http->timeout = 12;
|
||||
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
|
||||
io_saveFile($cf,$data);
|
||||
if(substr(trim($data), -1) != '%') {
|
||||
// this doesn't look like one of our messages, maybe some WiFi login interferred
|
||||
$data = '';
|
||||
}else {
|
||||
io_saveFile($cf,$data);
|
||||
}
|
||||
}else{
|
||||
dbglog("checkUpdateMessages(): messages.txt up to date");
|
||||
$data = io_readFile($cf);
|
||||
|
|
Loading…
Reference in New Issue