summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-04 16:47:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-04 16:47:48 +0200
commita3dcd98f6ec721b709a7fee982f6e790e1e53328 (patch)
treeab353ccd4c3533856f5aaf7c79301957440f36dc /application
parent855b7b25aeba021400aa6a3438e2ab19c3b63907 (diff)
Add support for enabling the profiler
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/config/config.php3
-rw-r--r--application/core/MY_Controller.php4
2 files changed, 7 insertions, 0 deletions
diff --git a/application/config/config.php b/application/config/config.php
index 4aadac68d..388776cda 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -408,6 +408,9 @@ if (extension_loaded("ldap")) {
);
}
+// possible values: production, development
+$config['environment'] = "production";
+
if (file_exists(FCPATH.'application/config/config-local.php')) {
include FCPATH.'application/config/config-local.php';
}
diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php
index 008c48dec..b3a561032 100644
--- a/application/core/MY_Controller.php
+++ b/application/core/MY_Controller.php
@@ -92,6 +92,10 @@ class MY_Controller extends CI_Controller {
$this->security->csrf_verify();
}
+ if ($this->config->item("environment") == "development" && static_storage("response_type") != "json") {
+ $this->output->enable_profiler(true);
+ }
+
$this->data['title'] = "FileBin";
}
}