summaryrefslogtreecommitdiffstats
path: root/system/core/Router.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-17 14:55:08 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-17 14:55:08 +0200
commit55450deee2acbdf112f5c206673b3215ca10dfcb (patch)
tree09fa0f810524ed353f868194059f336c6f26eb50 /system/core/Router.php
parent351c2e1b0d3fdca80a5483d708d7c71084226e68 (diff)
parente30b3f7afafa2c016cf78cc8bb8a457c2dbcda8c (diff)
merge upstream
Diffstat (limited to 'system/core/Router.php')
-rwxr-xr-xsystem/core/Router.php25
1 files changed, 11 insertions, 14 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index 9314052fe..5ea13797b 100755
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -32,8 +32,8 @@
*
* @package CodeIgniter
* @subpackage Libraries
- * @author EllisLab Dev Team
* @category Libraries
+ * @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/general/routing.html
*/
class CI_Router {
@@ -44,42 +44,42 @@ class CI_Router {
* @var object
*/
public $config;
-
+
/**
* List of routes
*
* @var array
*/
public $routes = array();
-
+
/**
* List of error routes
*
* @var array
*/
public $error_routes = array();
-
+
/**
* Current class name
*
* @var string
*/
- public $class = '';
-
+ public $class = '';
+
/**
* Current method name
*
* @var string
*/
public $method = 'index';
-
+
/**
* Sub-directory that contains the requested controller class
*
* @var string
*/
public $directory = '';
-
+
/**
* Default controller (and method if specific)
*
@@ -91,6 +91,8 @@ class CI_Router {
* Constructor
*
* Runs the route mapping function.
+ *
+ * @return void
*/
public function __construct()
{
@@ -433,12 +435,7 @@ class CI_Router {
*/
public function fetch_method()
{
- if ($this->method == $this->fetch_class())
- {
- return 'index';
- }
-
- return $this->method;
+ return ($this->method == $this->fetch_class()) ? 'index' : $this->method;
}
// --------------------------------------------------------------------