Upgrade to CodeIgniter 2.0.3
This commit is contained in:
@@ -87,13 +87,13 @@ class CI_Router {
|
||||
}
|
||||
|
||||
// Load the routes.php file.
|
||||
if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT))
|
||||
if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/routes.php'))
|
||||
{
|
||||
include(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT);
|
||||
include(APPPATH.'config/'.ENVIRONMENT.'/routes.php');
|
||||
}
|
||||
elseif (is_file(APPPATH.'config/routes'.EXT))
|
||||
elseif (is_file(APPPATH.'config/routes.php'))
|
||||
{
|
||||
include(APPPATH.'config/routes'.EXT);
|
||||
include(APPPATH.'config/routes.php');
|
||||
}
|
||||
|
||||
$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
|
||||
@@ -227,7 +227,7 @@ class CI_Router {
|
||||
}
|
||||
|
||||
// Does the requested controller exist in the root folder?
|
||||
if (file_exists(APPPATH.'controllers/'.$segments[0].EXT))
|
||||
if (file_exists(APPPATH.'controllers/'.$segments[0].'.php'))
|
||||
{
|
||||
return $segments;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ class CI_Router {
|
||||
if (count($segments) > 0)
|
||||
{
|
||||
// Does the requested controller exist in the sub-folder?
|
||||
if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT))
|
||||
if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].'.php'))
|
||||
{
|
||||
show_404($this->fetch_directory().$segments[0]);
|
||||
}
|
||||
@@ -264,7 +264,7 @@ class CI_Router {
|
||||
}
|
||||
|
||||
// Does the default controller exist in the sub-folder?
|
||||
if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT))
|
||||
if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.'.php'))
|
||||
{
|
||||
$this->directory = '';
|
||||
return array();
|
||||
|
||||
Reference in New Issue
Block a user