Revert "Abstracting the loading of files in the config directory depending on environments."
This reverts commit 5c1aa631c5f5ec2f6b75ba1158178418e50ba11a.
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 3173c98..5f5d1aa 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -70,7 +70,14 @@
$extension = end($x);
// Load the mime types
- load_environ_config('mimes');
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
+ }
+ elseif (is_file(APPPATH.'config/mimes.php'))
+ {
+ include(APPPATH.'config/mimes.php');
+ }
// Set a default mime if we can't find it
if ( ! isset($mimes[$extension]))
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index b4edcde..5b50853 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -364,7 +364,14 @@
if ( ! is_array($mimes))
{
- load_environ_config('mimes');
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
+ }
+ elseif (is_file(APPPATH.'config/mimes.php'))
+ {
+ include(APPPATH.'config/mimes.php');
+ }
if ( ! is_array($mimes))
{
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index fa805f1..b6bb402 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -275,7 +275,14 @@
if ( ! is_array($_doctypes))
{
- load_environ_config('doctypes');
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php'))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php');
+ }
+ elseif (is_file(APPPATH.'config/doctypes.php'))
+ {
+ include(APPPATH.'config/doctypes.php');
+ }
if ( ! is_array($_doctypes))
{
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index e04d5d6..38e2965 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -241,7 +241,14 @@
{
function _get_smiley_array()
{
- load_environ_config('smileys');
+ if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
+ }
+ elseif (file_exists(APPPATH.'config/smileys.php'))
+ {
+ include(APPPATH.'config/smileys.php');
+ }
if (isset($smileys) AND is_array($smileys))
{
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 7a4a689..38b46e2 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -378,7 +378,14 @@
{
function convert_accented_characters($str)
{
- load_environ_config('foreign_chars');
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars.php'))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars.php');
+ }
+ elseif (is_file(APPPATH.'config/foreign_chars.php'))
+ {
+ include(APPPATH.'config/foreign_chars.php');
+ }
if ( ! isset($foreign_characters))
{