From b966701fad01c094199a89f7e4df72d981e5cf48 Mon Sep 17 00:00:00 2001 From: Songpol Sripaoeiam Date: Sun, 1 Apr 2012 17:13:44 +0700 Subject: 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 --- system/core/Output.php | 11 ++++++----- 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. -- cgit v1.2.3-24-g4f1b