From 39b1c11f5976104dce30fe83e1d3c6f9ed616122 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Mon, 4 Jun 2012 16:51:14 -0500 Subject: Direct return from mimes config, instead of using global $mimes; Global variables are generally a terrible idea, especially for something as simple as this. The mimes.php now returns an array instead of just injecting a variable name into the global namespace. --- system/core/Output.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index 9b85b3ec4..a9e77cc5f 100755 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -106,15 +106,13 @@ class CI_Output { // Get mime types for later if (defined('ENVIRONMENT') && file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { - include APPPATH.'config/'.ENVIRONMENT.'/mimes.php'; + $this->mime_types = include APPPATH.'config/'.ENVIRONMENT.'/mimes.php'; } else { - include APPPATH.'config/mimes.php'; + $this->mime_types = include APPPATH.'config/mimes.php'; } - - $this->mime_types = $mimes; log_message('debug', 'Output Class Initialized'); } -- cgit v1.2.3-24-g4f1b