From de6312ccf94a588a63a2af7b2a7c9b2584949927 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 28 Jun 2011 22:47:44 -0500 Subject: [PATCH] adjusted route/loader comments. --- system/route/loader.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/system/route/loader.php b/system/route/loader.php index de694b30..d03a1d5d 100644 --- a/system/route/loader.php +++ b/system/route/loader.php @@ -25,18 +25,21 @@ public static function load($uri) // -------------------------------------------------------------- // If the request is to the root, load the "home" routes file. + // + // Otherwise, load the route file matching the first segment of + // the URI as well as the "home" routes file. // -------------------------------------------------------------- if ($uri == '/') { return require APP_PATH.'routes/home'.EXT; } - // -------------------------------------------------------------- - // Load the route file matching the first segment of the URI. - // -------------------------------------------------------------- else { $segments = explode('/', trim($uri, '/')); + // -------------------------------------------------------------- + // If the file doesn't exist, we'll just return the "home" file. + // -------------------------------------------------------------- if ( ! file_exists(APP_PATH.'routes/'.$segments[0].EXT)) { return require APP_PATH.'routes/home'.EXT;