Escape quotes and full release > beta

Escape quotes in message so we can have quoted URLs in links etc
If our version is beta, the current not and we have matching numbers,
take 0.1 off our version number so it's seen as a lesser version
This commit is contained in:
Matt Pass
2013-05-29 13:57:43 +01:00
parent 1f10cad45b
commit 2c4ee9370c

View File

@@ -17,8 +17,10 @@ if ($ICEcoder["checkUpdates"]) {
$icvInfo = explode("\n", curl_exec($ch));
}
$icv = $icvInfo[0];
$icvI = $icvInfo[1];
if ($ICEcoder["versionNo"]<$icv) {
$icvI = str_replace('"','\\\'',$icvInfo[1]);
$thisV = $ICEcoder["versionNo"];
if (strpos($thisV,"beta")>-1 && !strpos($icv,"beta") && str_replace(" beta","",$thisV) == $icv) {$thisV-=0.1;};
if ($thisV<$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><br>".$icvI."');";
}
}