summaryrefslogtreecommitdiffstats
path: root/system/core/CodeIgniter.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-13 18:31:49 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-13 18:31:49 +0200
commitadd9ca05c17e5bfd17ded6a65b1a084f7da5d633 (patch)
tree106585c663c32f3155a20a6d41279f2fa9f2a4aa /system/core/CodeIgniter.php
parent3cf2715501be298ef00166d57a4df39829aa2c09 (diff)
parent6cf190dcd68432a5bcea91bfc10a38b3f56e7f46 (diff)
Merged my GitHub mirror.
Diffstat (limited to 'system/core/CodeIgniter.php')
-rw-r--r--system/core/CodeIgniter.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 03b25ab9e..b49449005 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -267,7 +267,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}");
+ }
}
/*