update check: check against last version available on github.com/shaarli/Shaarli
* fixes https://github.com/shaarli/Shaarli/issues/5
This commit is contained in:
parent
ccfc046c11
commit
b11bc5b6f9
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ function checkUpdate()
|
|||
if (!is_file($GLOBALS['config']['UPDATECHECK_FILENAME']) || (filemtime($GLOBALS['config']['UPDATECHECK_FILENAME'])<time()-($GLOBALS['config']['UPDATECHECK_INTERVAL'])))
|
||||
{
|
||||
$version=shaarli_version;
|
||||
list($httpstatus,$headers,$data) = getHTTP('http://sebsauvage.net/files/shaarli_version.txt',2);
|
||||
list($httpstatus,$headers,$data) = getHTTP('https://raw.githubusercontent.com/shaarli/Shaarli/master/shaarli_version.txt',2);
|
||||
if (strpos($httpstatus,'200 OK')!==false) $version=$data;
|
||||
// If failed, never mind. We don't want to bother the user with that.
|
||||
file_put_contents($GLOBALS['config']['UPDATECHECK_FILENAME'],$version); // touch file date
|
||||
|
|
Loading…
Reference in a new issue