From c26b9ebb00e29be2e972fece3bcf73d33249a64b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 24 Feb 2014 11:31:36 +0200 Subject: Don't use globals - Use load_class() to get objects during bootstrap process. - Change load_class() to accept a class constructor parameter instead of previously unused class name prefix. - Change CI_Router::__construct() to accept as a parameter. --- system/core/Router.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'system/core/Router.php') diff --git a/system/core/Router.php b/system/core/Router.php index 05263b153..2448d9c8c 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -109,10 +109,8 @@ class CI_Router { * * @return void */ - public function __construct() + public function __construct($routing = NULL) { - global $routing; - $this->config =& load_class('Config', 'core'); $this->uri =& load_class('URI', 'core'); @@ -120,7 +118,7 @@ class CI_Router { $this->_set_routing(); // Set any routing overrides that may exist in the main index file - if (isset($routing) && is_array($routing)) + if (is_array($routing)) { if (isset($routing['directory'])) { -- cgit v1.2.3-24-g4f1b