From 8c98e13984faf7183e4dd3956ae57720ea5525fd Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 8 Sep 2012 19:34:25 +0100 Subject: [PATCH] Version number is now numeric only Removed 'v ' prefix from version number so it can be evaluated in conditions easier Hardcoded 'v ' before all places where the version number is shown No longer need to ltrim 'v ' from the version number --- index.php | 4 ++-- lib/settings-screen.php | 2 +- lib/settings.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index c1f16bd..e2e6f24 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,7 @@ if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*" if ($ICEcoder["checkUpdates"]) { $icv = json_encode(file_get_contents("http://icecoder.net/latest-version.txt")); $icv = rtrim(ltrim($icv,'"'),'"\\n'); - if (ltrim($ICEcoder["versionNo"],"v ")<$icv) { + if ($ICEcoder["versionNo"]<$icv) { $updateMsg = ';top.ICEcoder.message(\'ICEcoder '.$icv.' now released\n\nPlease upgrade\')'; } else { $cmv = json_encode(file_get_contents("http://codemirror.net/latest-version.txt")); @@ -95,7 +95,7 @@ previousFiles = [ -
+
v
diff --git a/lib/settings-screen.php b/lib/settings-screen.php index 1e0eed1..6690e32 100644 --- a/lib/settings-screen.php +++ b/lib/settings-screen.php @@ -36,7 +36,7 @@ for ($i=0;$i -
+
v

git:
diff --git a/lib/settings.php b/lib/settings.php index 58d8eb3..ccb58e5 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -29,7 +29,7 @@ include($settingsFile); // Add ICEcoder settings to beginning of $ICEcoder array $ICEcoder = array( - "versionNo" => "v 0.8.3", + "versionNo" => "0.8.3", "codeMirrorDir" => "CodeMirror-2.33", "cMThisVer" => 2.33 )+$ICEcoder; @@ -227,7 +227,7 @@ if ($ICEcoder["accountPassword"] == "" && isset($_GET['settings'])) {

-
+
v