diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -184,8 +184,8 @@ function checkUpdate() | |||
184 | if (!is_file($GLOBALS['config']['UPDATECHECK_FILENAME']) || (filemtime($GLOBALS['config']['UPDATECHECK_FILENAME'])<time()-($GLOBALS['config']['UPDATECHECK_INTERVAL']))) | 184 | if (!is_file($GLOBALS['config']['UPDATECHECK_FILENAME']) || (filemtime($GLOBALS['config']['UPDATECHECK_FILENAME'])<time()-($GLOBALS['config']['UPDATECHECK_INTERVAL']))) |
185 | { | 185 | { |
186 | $version=shaarli_version; | 186 | $version=shaarli_version; |
187 | list($httpstatus,$headers,$data) = getHTTP('https://raw.githubusercontent.com/shaarli/Shaarli/master/shaarli_version.txt',2); | 187 | list($httpstatus,$headers,$data) = getHTTP('https://raw.githubusercontent.com/shaarli/Shaarli/master/shaarli_version.php',2); |
188 | if (strpos($httpstatus,'200 OK')!==false) $version=$data; | 188 | if (strpos($httpstatus,'200 OK')!==false) $version=str_replace(' */ ?>','',str_replace('<?php /* ','',$data)); |
189 | // If failed, never mind. We don't want to bother the user with that. | 189 | // If failed, never mind. We don't want to bother the user with that. |
190 | file_put_contents($GLOBALS['config']['UPDATECHECK_FILENAME'],$version); // touch file date | 190 | file_put_contents($GLOBALS['config']['UPDATECHECK_FILENAME'],$version); // touch file date |
191 | } | 191 | } |