From 07ad666409b60610a1e5b07368506f9f0ca45b22 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 3 Oct 2006 06:12:52 +0000 Subject: --- system/codeigniter/Base5.php | 32 ++++++++++++-------------------- system/database/DB_result.php | 4 ++-- system/libraries/Profiler.php | 4 +++- 3 files changed, 17 insertions(+), 23 deletions(-) (limited to 'system') diff --git a/system/codeigniter/Base5.php b/system/codeigniter/Base5.php index ef3fc67f4..a0beea46c 100644 --- a/system/codeigniter/Base5.php +++ b/system/codeigniter/Base5.php @@ -32,31 +32,23 @@ class CI_Base { - public function CI_Base() - { - $instance =& _load_class('Instance'); - $instance->set_instance($this); - } -} - -class Instance { - public static $instance; + public static $instance; - public function set_instance(&$object) - { - self::$instance =& $object; - } - - public function &get_instance() - { - return self::$instance; - } + public function CI_Base() + { + self::$instance =& $this; + } + + public static function &get_instance() + { + return self::$instance; + } } function &get_instance() { - $instance =& _load_class('Instance'); - return $instance->get_instance(); + return CI_Base::get_instance(); } + ?> \ No newline at end of file diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 32c51e07b..3bd43bac6 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -70,7 +70,7 @@ class CI_DB_result { if (count($this->result_object) == 0) { - return FALSE; + return array(); } return $this->result_object; @@ -98,7 +98,7 @@ class CI_DB_result { if (count($this->result_array) == 0) { - return FALSE; + return array(); } return $this->result_array; diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 807a7a83f..6626190b1 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -174,7 +174,9 @@ class CI_Profiler { */ function run($output = '') { - $output = '
'; + $obj =& get_instance(); + + $output = '
'; $output .= $this->_compile_benchmarks(); $output .= $this->_compile_post(); -- cgit v1.2.3-24-g4f1b