From 716a957e938dda6e6c43d9c84f7f0d56b93915c1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 1 Aug 2011 17:09:10 -0500 Subject: [PATCH] Refactoring. --- system/routing/loader.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/routing/loader.php b/system/routing/loader.php index ea202924..cff3a5db 100644 --- a/system/routing/loader.php +++ b/system/routing/loader.php @@ -37,7 +37,12 @@ public function load($uri) { $base = require $this->path.'routes'.EXT; - return (is_dir($this->path.'routes') and $uri != '') ? array_merge($this->load_nested_routes($uri), $base) : $base; + if ( ! is_dir($this->path.'routes') or $uri == '') + { + return $base; + } + + return array_merge($this->load_nested_routes($uri), $base); } /**