summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-02-01 00:26:46 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-02-01 00:26:46 +0100
commit75f5ff5d99533a423e68686d89889d172c37d98e (patch)
tree0e60fae243a6e69e2e2bd03ecbf446cabb9592f5 /system/core
parentdda07e9efe683248c042307147b6573e104777ad (diff)
parentc5bf616c68ab4d18777ba77d5eaf07384b392f78 (diff)
Automated merge with http://hg.ellislab.com/CodeIgniter-Reactor
Diffstat (limited to 'system/core')
-rw-r--r--system/core/CodeIgniter.php14
-rw-r--r--system/core/Router.php2
2 files changed, 13 insertions, 3 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 2d3f24958..0414ffbf1 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -80,7 +80,7 @@
{
get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix']));
}
-
+
/*
* ------------------------------------------------------
* Set a liberal script execution time limit
@@ -289,7 +289,17 @@
// methods, so we'll use this workaround for consistent behavior
if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI))))
{
- show_404("{$class}/{$method}");
+ // Check and see if we are using a 404 override and use it.
+ if ( ! empty($RTR->routes['404_override']))
+ {
+ $x = explode('/', $RTR->routes['404_override']);
+ $class = $x[0];
+ $method = (isset($x[1]) ? $x[1] : 'index');
+ }
+ else
+ {
+ show_404("{$class}/{$method}");
+ }
}
// Call the requested method.
diff --git a/system/core/Router.php b/system/core/Router.php
index 7be508fef..6893e6e92 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -270,7 +270,7 @@ class CI_Router {
// If we've gotten this far it means that the URI does not correlate to a valid
// controller class. We will now see if there is an override
- if (!empty($this->routes['404_override']))
+ if ( ! empty($this->routes['404_override']))
{
$x = explode('/', $this->routes['404_override']);