diff options
author | nodiscc <nodiscc@gmail.com> | 2014-10-23 17:41:06 +0200 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2014-10-23 17:41:06 +0200 |
commit | 57dbbe51a613b31f84071a22897857b81cd9e2ec (patch) | |
tree | 3c1cc474506762bf36a7b62d59cc2c8594332a7e | |
parent | 736feea58ea3ea08df8681cfc6a01914cf0c6331 (diff) | |
parent | b11bc5b6f91038718eb31055a7c92c785bc843e0 (diff) | |
download | Shaarli-57dbbe51a613b31f84071a22897857b81cd9e2ec.tar.gz Shaarli-57dbbe51a613b31f84071a22897857b81cd9e2ec.tar.zst Shaarli-57dbbe51a613b31f84071a22897857b81cd9e2ec.zip |
Merge pull request #31 from nodiscc/version-check
Version check: check against latest version on github
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | shaarli_version.txt | 1 |
2 files changed, 2 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 |
diff --git a/shaarli_version.txt b/shaarli_version.txt new file mode 100644 index 00000000..92b4d84d --- /dev/null +++ b/shaarli_version.txt | |||
@@ -0,0 +1 @@ | |||
0.0.41 beta \ No newline at end of file | |||