summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorThor (atiredmachine) <thor@bandwidthbeta.com>2012-01-25 08:08:11 +0100
committerThor (atiredmachine) <thor@bandwidthbeta.com>2012-01-25 08:08:11 +0100
commit242115ce9eecee4f37ec94acd8534b89a9412949 (patch)
tree82ab0e2f2ef6758eae9da1edc8ee2067f143f139 /system
parentf59ec6fe4fab3bd5ff71d920e13f983454a9fb65 (diff)
Works with set_content_type() to automatically minify for current mime type.
Diffstat (limited to 'system')
-rwxr-xr-xsystem/core/Output.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index c95f551ec..904e7afc7 100755
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -65,6 +65,12 @@ class CI_Output {
*/
protected $mime_types = array();
/**
+ * Mime-type for the current page
+ *
+ * @var array
+ */
+ protected $mime_type = NULL;
+ /**
* Determines wether profiler is enabled
*
* @var book
@@ -216,6 +222,8 @@ class CI_Output {
}
}
}
+
+ $this->mime_type = $mime_type;
$header = 'Content-Type: '.$mime_type;
@@ -329,7 +337,7 @@ class CI_Output {
// Is minify requested?
if ($CFG->item('minify_output') === TRUE)
{
- $output = $this->minify($output);
+ $output = $this->minify($output,$this->mime_type);
}
@@ -579,6 +587,13 @@ class CI_Output {
*/
public function minify($output,$type='text/html')
{
+ if($type===NULL)
+ {
+ $type = 'text/html';
+ }
+
+ die($type);
+
switch ($type)
{
case 'text/html':