From 2c4ee9370c5d7263d2888241f2fcf6e8c04531ab Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 29 May 2013 13:57:43 +0100 Subject: [PATCH] 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 --- index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index dcf5fc6..c1e326d 100644 --- a/index.php +++ b/index.php @@ -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('UPDATE INFO: ICEcoder v ".$icv." now available. (Your version is v ".$ICEcoder["versionNo"]."). Get it free from icecoder.net
".$icvI."');"; } }