diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-13 18:31:49 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-13 18:31:49 +0200 |
commit | add9ca05c17e5bfd17ded6a65b1a084f7da5d633 (patch) | |
tree | 106585c663c32f3155a20a6d41279f2fa9f2a4aa /system/core/Router.php | |
parent | 3cf2715501be298ef00166d57a4df39829aa2c09 (diff) | |
parent | 6cf190dcd68432a5bcea91bfc10a38b3f56e7f46 (diff) |
Merged my GitHub mirror.
Diffstat (limited to 'system/core/Router.php')
-rw-r--r-- | system/core/Router.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/system/core/Router.php b/system/core/Router.php index 5e92a04b1..668ac0954 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -244,7 +244,20 @@ class CI_Router { // Does the requested controller exist in the sub-folder? if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].'.php')) { - show_404($this->fetch_directory().$segments[0]); + if ( ! empty($this->routes['404_override'])) + { + $x = explode('/', $this->routes['404_override']); + + $this->set_directory(''); + $this->set_class($x[0]); + $this->set_method(isset($x[1]) ? $x[1] : 'index'); + + return $x; + } + else + { + show_404($this->fetch_directory().$segments[0]); + } } } else |