diff options
author | Andrey Andreev <narf@devilix.net> | 2013-07-22 13:29:10 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-07-22 13:29:10 +0200 |
commit | 20292311636837e120d205e470e41826820feb46 (patch) | |
tree | bb9fa90e5b249369f6ad1e0e635e8ef3e2fdd13d /system/core/CodeIgniter.php | |
parent | 2d536f848dae5b1781bdfbdaf914fed1010e72bf (diff) |
Change class filenames to Ucfirst
Diffstat (limited to 'system/core/CodeIgniter.php')
-rw-r--r-- | system/core/CodeIgniter.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index c68266408..a026920a4 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -240,12 +240,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // Load the local application controller // Note: The Router class automatically validates the controller path using the router->_validate_request(). // If this include fails it means that the default controller in the Routes.php file is not resolving to something valid. - if ( ! file_exists(APPPATH.'controllers/'.$RTR->directory.$RTR->class.'.php')) + $class = ucfirst($RTR->class); + if ( ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php')) { show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.'); } - include(APPPATH.'controllers/'.$RTR->directory.$RTR->class.'.php'); + include(APPPATH.'controllers/'.$RTR->directory.$class.'.php'); // Set a mark point for benchmarking $BM->mark('loading_time:_base_classes_end'); @@ -257,9 +258,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * None of the methods in the app controller or the * loader class can be called via the URI, nor can - * controller functions that begin with an underscore. + * controller methods that begin with an underscore. */ - $class = $RTR->class; $method = $RTR->method; if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method)) @@ -271,6 +271,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $method = 'index'; } + $class = ucfirst($class); + if ( ! class_exists($class, FALSE)) { if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) @@ -309,6 +311,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $method = 'index'; } + $class = ucfirst($class); + if ( ! class_exists($class, FALSE)) { if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) |