summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-22 01:50:23 +0200
committeradmin <devnull@localhost>2006-09-22 01:50:23 +0200
commitc1fa07415179d63762f1a22f0f74660a8034707f (patch)
tree8eb458e58d1c221dfa01f2adc0a97cf084bcc805 /system
parentfc6d9079f9f47d7474c65d6bec2aa7305a35df64 (diff)
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Controller.php2
-rw-r--r--system/libraries/Output.php22
-rw-r--r--system/libraries/URI.php2
3 files changed, 17 insertions, 9 deletions
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index 5a32e65c0..0dd6ee6a4 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.php
@@ -380,7 +380,7 @@ class Controller extends CI_Base {
eval('class CI_DB extends CI_DB_driver { }');
}
}
-
+
require_once(BASEPATH.'drivers/DB_'.$params['dbdriver'].EXT);
// Instantiate the DB adapter
diff --git a/system/libraries/Output.php b/system/libraries/Output.php
index 4a3adb858..ec3660c6c 100644
--- a/system/libraries/Output.php
+++ b/system/libraries/Output.php
@@ -123,8 +123,8 @@ class CI_Output {
*/
function _display($output = '')
{
- $BM =& _load_class('CI_Benchmark');
-
+ $obj =& get_instance();
+
if ($output == '')
{
$output =& $this->final_output;
@@ -138,15 +138,14 @@ class CI_Output {
// Parse out the elapsed time and memory usage, and
// swap the pseudo-variables with the data
- $elapsed = $BM->elapsed_time('code_igniter_start', 'code_igniter_end');
+ $elapsed = $obj->benchmark->elapsed_time('code_igniter_start', 'code_igniter_end');
$memory = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';
$output = str_replace('{memory_usage}', $memory, $output);
$output = str_replace('{elapsed_time}', $elapsed, $output);
// Is compression requested?
- $CFG =& _load_class('CI_Config');
- if ($CFG->item('compress_output') === TRUE)
+ if ($obj->config->item('compress_output') === TRUE)
{
if (extension_loaded('zlib'))
{
@@ -166,8 +165,17 @@ class CI_Output {
}
}
- // Send it to the browser!
- echo $output;
+ // Send the finalized output either directly
+ // to the browser or to the user's _output()
+ // function if it exists
+ if (method_exists($obj, '_output'))
+ {
+ $obj->_output($output);
+ }
+ else
+ {
+ echo $output; // Send it to the browser!
+ }
log_message('debug', "Final output sent to browser");
log_message('debug', "Total execution time: ".$elapsed);
diff --git a/system/libraries/URI.php b/system/libraries/URI.php
index e831d9526..89ca42e44 100644
--- a/system/libraries/URI.php
+++ b/system/libraries/URI.php
@@ -280,7 +280,7 @@ class CI_URI {
$leading = '/';
$trailing = '/';
}
- return ( ! isset($this->router->$which[$n])) ? '' : $leading.$this->router->$which[$n].$trailing;
+ return $leading.$this->$which($n).$trailing;
}
// --------------------------------------------------------------------