diff options
author | nodiscc <nodiscc@gmail.com> | 2014-10-21 17:54:35 +0200 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2014-10-21 18:11:16 +0200 |
commit | b11bc5b6f91038718eb31055a7c92c785bc843e0 (patch) | |
tree | 3c1cc474506762bf36a7b62d59cc2c8594332a7e /index.php | |
parent | ccfc046c111264c5ca7acbc790ad4b4c3c7bffc2 (diff) | |
download | Shaarli-b11bc5b6f91038718eb31055a7c92c785bc843e0.tar.gz Shaarli-b11bc5b6f91038718eb31055a7c92c785bc843e0.tar.zst Shaarli-b11bc5b6f91038718eb31055a7c92c785bc843e0.zip |
update check: check against last version available on github.com/shaarli/Shaarli
* fixes https://github.com/shaarli/Shaarli/issues/5
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -133,7 +133,7 @@ function checkUpdate() | |||
133 | if (!is_file($GLOBALS['config']['UPDATECHECK_FILENAME']) || (filemtime($GLOBALS['config']['UPDATECHECK_FILENAME'])<time()-($GLOBALS['config']['UPDATECHECK_INTERVAL']))) | 133 | if (!is_file($GLOBALS['config']['UPDATECHECK_FILENAME']) || (filemtime($GLOBALS['config']['UPDATECHECK_FILENAME'])<time()-($GLOBALS['config']['UPDATECHECK_INTERVAL']))) |
134 | { | 134 | { |
135 | $version=shaarli_version; | 135 | $version=shaarli_version; |
136 | list($httpstatus,$headers,$data) = getHTTP('http://sebsauvage.net/files/shaarli_version.txt',2); | 136 | list($httpstatus,$headers,$data) = getHTTP('https://raw.githubusercontent.com/shaarli/Shaarli/master/shaarli_version.txt',2); |
137 | if (strpos($httpstatus,'200 OK')!==false) $version=$data; | 137 | if (strpos($httpstatus,'200 OK')!==false) $version=$data; |
138 | // If failed, never mind. We don't want to bother the user with that. | 138 | // If failed, never mind. We don't want to bother the user with that. |
139 | file_put_contents($GLOBALS['config']['UPDATECHECK_FILENAME'],$version); // touch file date | 139 | file_put_contents($GLOBALS['config']['UPDATECHECK_FILENAME'],$version); // touch file date |