summaryrefslogtreecommitdiffstats
path: root/system/core/Router.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-04-26 23:58:56 +0200
committerTimothy Warren <tim@timshomepage.net>2012-04-26 23:58:56 +0200
commit042766bac61958a21ba5d6b3c53b0e4296fdcce7 (patch)
treedf9e26699ddb5d3841a0d1cc1795913c819bf611 /system/core/Router.php
parent0688ac9ad88a03f1c56cfcd9e3c475b83301344d (diff)
parent61318a2c53c13a314f483fcbbfd64c6e01f5242c (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into library-cleanup
Diffstat (limited to 'system/core/Router.php')
-rwxr-xr-xsystem/core/Router.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index b5c200214..fe9909b06 100755
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -50,35 +50,35 @@ class CI_Router {
*
* @var array
*/
- public $routes = array();
+ public $routes = array();
/**
* List of error routes
*
* @var array
*/
- public $error_routes = array();
+ public $error_routes = array();
/**
* Current class name
*
* @var string
*/
- public $class = '';
+ public $class = '';
/**
* Current method name
*
* @var string
*/
- public $method = 'index';
+ public $method = 'index';
/**
* Sub-directory that contains the requested controller class
*
* @var string
*/
- public $directory = '';
+ public $directory = '';
/**
* Default controller (and method if specific)
@@ -242,9 +242,12 @@ class CI_Router {
$segments[1] = 'index';
}
+ // This is being routed to a file in a sub directory
+ $this->directory and array_unshift($segments, trim($this->directory, '/'));
+
// Update our "routed" segment array to contain the segments.
// Note: If there is no custom routing, this array will be
- // identical to $this->uri->segments
+ // identical to $this->uri->segments
$this->uri->rsegments = $segments;
}