summaryrefslogtreecommitdiffstats
path: root/system/libraries/Controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Controller.php')
-rw-r--r--system/libraries/Controller.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index 4b9e3e960..c80097a17 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.php
@@ -80,20 +80,13 @@ class Controller extends CI_Base {
if (floor(phpversion()) >= 5)
{
$this->load = new CI_Loader();
+ $this->load->_ci_use_instance = TRUE;
+ $this->load->_ci_autoloader();
}
-
- // Load everything specified in the autoload.php file
- $this->load->_ci_autoloader();
-
- // This allows anything loaded using $this->load (viwes, files, etc.)
- // to become accessible from within the Controller class functions.
- foreach (get_object_vars($this) as $key => $var)
+ else
{
- if (is_object($var))
- {
- $this->load->$key =& $this->$key;
- }
- }
+ $this->_ci_autoloader();
+ }
}
// --------------------------------------------------------------------