From 0ea04149bbae0fdcde92b7362e7cbd76f0df3865 Mon Sep 17 00:00:00 2001 From: bubbafoley Date: Thu, 17 Mar 2011 14:55:41 -0500 Subject: load config files from environment specific locations in core classes, helpers and libraries --- system/core/Router.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'system/core/Router.php') diff --git a/system/core/Router.php b/system/core/Router.php index 6893e6e92..005e81748 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -87,7 +87,15 @@ class CI_Router { } // Load the routes.php file. - @include(APPPATH.'config/routes'.EXT); + + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT)) + { + @include(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT); + } + else + { + @include(APPPATH.'config/routes'.EXT); + } $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route; unset($route); -- cgit v1.2.3-24-g4f1b