Skip to content

Commit

Permalink
Merge pull request #31 from nodiscc/version-check
Browse files Browse the repository at this point in the history
Version check: check against latest version on github
  • Loading branch information
nodiscc committed Oct 23, 2014
2 parents 736feea + b11bc5b commit 57dbbe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions shaarli_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.41 beta

0 comments on commit 57dbbe5

Please sign in to comment.