diff options
author | Pascal Kriete <pascal@pascalkriete.com> | 2011-11-14 21:15:15 +0100 |
---|---|---|
committer | Pascal Kriete <pascal@pascalkriete.com> | 2011-11-14 21:15:15 +0100 |
commit | f525f10c850399700a4cce183aef55656ff44d31 (patch) | |
tree | d0250655551d773c9347573e594997e07d7280a5 /system/core/CodeIgniter.php | |
parent | 44cdece942c310f5520497dbde4febc26e96c27e (diff) | |
parent | 917c3455cc70d5117daa7359f345a820154ada3e (diff) |
Merge branch 'release/2.1.0'
Conflicts:
user_guide/helpers/url_helper.html
Diffstat (limited to 'system/core/CodeIgniter.php')
-rwxr-xr-x[-rw-r--r--] | system/core/CodeIgniter.php | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 94fecb5c0..db1aee574 100644..100755 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -27,17 +27,19 @@ * @link http://codeigniter.com/user_guide/ */ -/* - * ------------------------------------------------------ - * Define the CodeIgniter Version - * ------------------------------------------------------ +/** + * CodeIgniter Version + * + * @var string + * */ - define('CI_VERSION', '2.0.3'); + define('CI_VERSION', '2.1.0'); -/* - * ------------------------------------------------------ - * Define the CodeIgniter Branch (Core = TRUE, Reactor = FALSE) - * ------------------------------------------------------ +/** + * CodeIgniter Branch (Core = TRUE, Reactor = FALSE) + * + * @var boolean + * */ define('CI_CORE', FALSE); @@ -267,7 +269,25 @@ OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller'))) ) { - show_404("{$class}/{$method}"); + if ( ! empty($RTR->routes['404_override'])) + { + $x = explode('/', $RTR->routes['404_override']); + $class = $x[0]; + $method = (isset($x[1]) ? $x[1] : 'index'); + if ( ! class_exists($class)) + { + if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) + { + show_404("{$class}/{$method}"); + } + + include_once(APPPATH.'controllers/'.$class.'.php'); + } + } + else + { + show_404("{$class}/{$method}"); + } } /* |