From 3d45172991bc71b953e33acf08e19fa5363c7ab7 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 23 May 2013 09:53:24 +0100 Subject: [PATCH] Config now includes server name Config filename now also includes server name (domain and subdomains). This means you can end up with different config files depending on where ICEcoder is being used, such as config-localhost.php, config-mydomain_com.php, config-dev_mydomain_com.php etc. Also now using CodeMirror 3.13 --- lib/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/settings.php b/lib/settings.php index 8cc8684..bbe391e 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -73,7 +73,7 @@ function toUTF8noBOM($string,$message) { // Settings are stored in this file $settingsTemplate = 'config-template.php'; -$settingsFile = 'config.php'; +$settingsFile = 'config-'.str_replace(".","_",$_SERVER['SERVER_NAME']).'.php'; if (!file_exists(dirname(__FILE__)."/".$settingsFile)) { if (!copy(dirname(__FILE__)."/".$settingsTemplate, dirname(__FILE__)."/".$settingsFile)) { die("Couldn't create $settingsFile. Maybe you need write permissions on the lib folder?"); @@ -84,7 +84,7 @@ include(dirname(__FILE__)."/".$settingsFile); // Add ICEcoder settings to beginning of $ICEcoder array $ICEcoder = array( "versionNo" => "2.4", - "codeMirrorDir" => "CodeMirror-3.12", + "codeMirrorDir" => "CodeMirror-3.13", "demoMode" => false, "devMode" => false, "lineEnding" => "\n"