aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2014-10-23 17:41:06 +0200
committernodiscc <nodiscc@gmail.com>2014-10-23 17:41:06 +0200
commit57dbbe51a613b31f84071a22897857b81cd9e2ec (patch)
tree3c1cc474506762bf36a7b62d59cc2c8594332a7e /index.php
parent736feea58ea3ea08df8681cfc6a01914cf0c6331 (diff)
parentb11bc5b6f91038718eb31055a7c92c785bc843e0 (diff)
downloadShaarli-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
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 01872f4d..6fae2f8b 100644
--- a/index.php
+++ b/index.php
@@ -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