diff options
Diffstat (limited to 'system/core/Output.php')
-rw-r--r-- | system/core/Output.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/system/core/Output.php b/system/core/Output.php index 6644b3bff..bcba2577a 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -28,13 +28,12 @@ */ class CI_Output { + public $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage} protected $final_output; protected $cache_expiration = 0; protected $headers = array(); protected $mime_types = array(); protected $enable_profiler = FALSE; - protected $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage} - protected $_zlib_oc = FALSE; protected $_profiler_sections = array(); @@ -43,9 +42,18 @@ class CI_Output { $this->_zlib_oc = @ini_get('zlib.output_compression'); // Get mime types for later - include APPPATH.'config/mimes'.EXT; + if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + { + include APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT; + } + else + { + include APPPATH.'config/mimes'.EXT; + } + + $this->mime_types = $mimes; - + log_message('debug', "Output Class Initialized"); } @@ -78,7 +86,7 @@ class CI_Output { function set_output($output) { $this->final_output = $output; - + return $this; } @@ -168,7 +176,7 @@ class CI_Output { $header = 'Content-Type: '.$mime_type; $this->headers[] = array($header, TRUE); - + return $this; } |