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.
diff --git a/system/core/Router.php b/system/core/Router.php
index 05263b1..2448d9c 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -109,10 +109,8 @@
*
* @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 @@
$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']))
{