summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-03-15 22:01:39 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-03-15 22:01:39 +0100
commit35f6491450d8564b26cbfab90aedcd0e592a81d4 (patch)
tree5af2698fb6be6a23d0258560fc5598398ee12ba6
parentfba54e1278be65c8b600e3311c283342a597afab (diff)
constants.php will be loaded from the environment specific config folder if available.
-rw-r--r--system/core/CodeIgniter.php11
-rw-r--r--user_guide/changelog.html14
2 files changed, 22 insertions, 3 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 99c261e74..39a4d7ffd 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -53,7 +53,14 @@
* Load the framework constants
* ------------------------------------------------------
*/
- require(APPPATH.'config/constants'.EXT);
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants'.EXT))
+ {
+ require(APPPATH.'config/'.ENVIRONMENT.'/constants'.EXT);
+ }
+ else
+ {
+ require(APPPATH.'config/constants'.EXT);
+ }
/*
* ------------------------------------------------------
@@ -365,4 +372,4 @@
/* End of file CodeIgniter.php */
-/* Location: ./system/core/CodeIgniter.php */
+/* Location: ./system/core/CodeIgniter.php */ \ No newline at end of file
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index ea5134adf..003daf338 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -59,6 +59,18 @@ Change Log
<p>The <img src="images/reactor-bullet.png" width="16" height="16" alt="Reactor Marker" /> indicates items that were contributed to CodeIgniter via CodeIgniter Reactor.</p>
+<h2>Version 2.0.2</h2>
+<p>Release Date: n/a<br />
+Hg Tag: n/a</p>
+
+<ul>
+ <li>General changes
+ <ul>
+ <li class="reactor"><kbd>constants.php</kbd> will now be loaded from the environment folder if available.</li>
+ </ul>
+ </li>
+</ul>
+
<h2>Version 2.0.1</h2>
<p>Release Date: March, 15, 2011<br />
Hg Tag: v2.0.1</p>
@@ -68,7 +80,7 @@ Hg Tag: v2.0.1</p>
<ul>
<li>Added <kbd>$config['cookie_secure']</kbd> to the config file to allow requiring a secure (HTTPS) in order to set cookies.</li>
<li class="reactor">Added the constant <kbd>CI_CORE</kbd> to help differentiate between Core: TRUE and Reactor: FALSE.</li>
- <li class="reactor">Added an <kbd>ENVIRONMENT</kbd> constant in index.php, which affects PHP error reporting settings, and optionally,
+ <li class="reactor">Added an <kbd>ENVIRONMENT</kbd> constant in index.php, which affects PHP error reporting settings, and optionally,
which configuration files are loaded (see below). Read more on the <a href="general/environments.html">Handling Environments</a> page.</li>
<li class="reactor">Added support for <a href="libraries/config.html#environments">environment-specific</a> configuration files.</li>
</ul>