From 4abfa686ca53177b7dbbb7e1bac3febbbe27ec0f Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Wed, 10 Nov 2010 14:44:26 -0600 Subject: Blasting the Base4/5 files. Updating Controller.php to inherit bits from the old Base5. If a constructor is needed in a controller, call parent::__contruct() --- system/core/CodeIgniter.php | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'system/core/CodeIgniter.php') diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index bf412b21d..c50ae6d2b 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -208,25 +208,15 @@ * Load the app controller and local controller * ------------------------------------------------------ * - * Note: Due to the poor object handling in PHP 4 we'll - * conditionally load different versions of the base - * class. Retaining PHP 4 compatibility requires a bit of a hack. - * @PHP4 - * */ - if (is_php('5.0.0') == TRUE) - { - require(BASEPATH.'core/Base5'.EXT); - } - else + // Load the base controller class + require BASEPATH.'core/Controller'.EXT; + + function &get_instance() { - // The Loader class needs to be included first when running PHP 4.x - load_class('Loader', 'core'); - require(BASEPATH.'core/Base4'.EXT); + return CI_Controller::get_instance(); } - // Load the base controller class - require BASEPATH.'core/Controller'.EXT; if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT)) { -- cgit v1.2.3-24-g4f1b