diff options
author | Songpol Sripaoeiam <sripaoeiam@gmail.com> | 2012-04-01 12:13:44 +0200 |
---|---|---|
committer | Songpol Sripaoeiam <sripaoeiam@gmail.com> | 2012-04-01 12:13:44 +0200 |
commit | b966701fad01c094199a89f7e4df72d981e5cf48 (patch) | |
tree | a19a58a867b3616ff12f2c88cf8c40d9bbfa8416 | |
parent | 52fe7bb68f9961cdd765dd38e54779ae3b66e586 (diff) |
bracket on a new line
Also add space after foreach
bracket on a new line... Also add a space after if
Follow up from https://github.com/EllisLab/CodeIgniter/pull/1234/files#r630522
-rwxr-xr-x | system/core/Output.php | 11 | ||||
-rw-r--r-- | user_guide_src/source/libraries/output.rst | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/system/core/Output.php b/system/core/Output.php index 673ceb0ee..c0de24bb9 100755 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -231,12 +231,13 @@ class CI_Output { */ public function get_current_content_type() { - foreach($this->headers as $header){ - if(preg_match('/^Content-Type/', $header[0])){ - return str_replace('Content-Type: ', '', $header[0]); - } + foreach ($this->headers as $header){ + if (preg_match('/^Content-Type/', $header[0])) + { + return str_replace('Content-Type: ', '', $header[0]); } - return 'text/html'; + } + return 'text/html'; } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst index 8cd5ff895..ba1ef19e6 100644 --- a/user_guide_src/source/libraries/output.rst +++ b/user_guide_src/source/libraries/output.rst @@ -50,7 +50,7 @@ data, JPEG's, XML, etc easily. exists in config/mimes.php or it will have no effect. $this->output->get_current_content_type(); -==================================== +========================================== Get the current mime-type of your page and return 'text/html' by default. |