mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 00:34:00 +01:00
Change of latest version URL, not JSON encoded
Now calling /latest-version which is a tidier URL and also passing user version no to this This URL now tracks usage via Google Analytics, so I can begin to get an idea of which version nos users are on, geo data, overall usage etc No longer using json_encode as it's not JSON encoded, instead splitting on line breaks and grabbing first array value as the version no
This commit is contained in:
@@ -8,7 +8,8 @@ if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*"
|
||||
$updateMsg = '';
|
||||
// Check for updates
|
||||
if ($ICEcoder["checkUpdates"]) {
|
||||
$icv = json_encode(file_get_contents("http://icecoder.net/latest-version.txt"));
|
||||
$icv = explode("\n",file_get_contents("http://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"]));
|
||||
$icv = $icv[0];
|
||||
$icv = rtrim(ltrim($icv,'"'),'"\\n');
|
||||
if ($ICEcoder["versionNo"]<$icv) {
|
||||
$updateMsg = ";top.ICEcoder.dataMessage('<b>UPDATE INFO:</b> ICEcoder v ".$icv." now available. (Your version is v ".$ICEcoder["versionNo"]."). Get it free from <a href=\\'http://icecoder.net\\' target=\\'_blank\\' style=\\'color:#ddd\\'>icecoder.net</a>');";
|
||||
|
||||
Reference in New Issue
Block a user