diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-04-06 23:57:43 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-04-06 23:57:43 +0200 |
commit | 05fa61144667c85b0463f7e8baa6af00aa195dc6 (patch) | |
tree | 2a611231c945ce7fd5bd021e3491dd973794f58e /system/helpers | |
parent | 08b5169a5181706156c9a53229d164d9fa3aea32 (diff) |
Made Environment Support optional. Comment out or delete the constant to stop environment checks.
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/download_helper.php | 2 | ||||
-rw-r--r-- | system/helpers/file_helper.php | 2 | ||||
-rw-r--r-- | system/helpers/html_helper.php | 2 | ||||
-rw-r--r-- | system/helpers/smiley_helper.php | 15 | ||||
-rw-r--r-- | system/helpers/text_helper.php | 2 |
5 files changed, 9 insertions, 14 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index e537cdeca..f8073d238 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -58,7 +58,7 @@ if ( ! function_exists('force_download')) $extension = end($x); // Load the mime types - if (is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) { include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT); } diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 7a35c3fa1..44344947e 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -352,7 +352,7 @@ if ( ! function_exists('get_mime_by_extension')) if ( ! is_array($mimes)) { - if (is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) { include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT); } diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 53fc899a3..c6103ab6f 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -258,7 +258,7 @@ if ( ! function_exists('doctype')) if ( ! is_array($_doctypes)) { - if (is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT)) + if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT)) { include(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT); } diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index 6c901515d..a2d1031b3 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -229,26 +229,21 @@ if ( ! function_exists('_get_smiley_array')) { function _get_smiley_array() { - if ( ! file_exists(APPPATH.'config/smileys'.EXT) AND ! file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT)) - { - return FALSE; - } - - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT)) + if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT)) { include(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT); } - else + elseif (file_exists(APPPATH.'config/smileys'.EXT)) { include(APPPATH.'config/smileys'.EXT); } - if ( ! isset($smileys) OR ! is_array($smileys)) + if (isset($smileys) AND is_array($smileys)) { - return FALSE; + return $smileys; } - return $smileys; + return FALSE; } } diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 664408912..cca093976 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -366,7 +366,7 @@ if ( ! function_exists('convert_accented_characters')) { function convert_accented_characters($str) { - if (is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT)) + if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT)) { include(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT); } |