From f59c31ec2b1556d3f3aa3239a5c0150c9bbcf190 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sat, 18 Oct 2008 23:07:31 +0000 Subject: Fixed a bug in which servers that are case sensitive to file names were ignoring config files unless they were named with the correct case --- system/libraries/Loader.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'system/libraries/Loader.php') diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index b30798f6b..da8d9e761 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -862,9 +862,18 @@ class CI_Loader { // Is there an associated config file for this class? if ($config === NULL) { - if (file_exists(APPPATH.'config/'.$class.EXT)) + // We test for both uppercase and lowercase, for servers that + // are case-sensitive with regard to file names + if (file_exists(APPPATH.'config/'.strtolower($class).EXT)) { - include_once(APPPATH.'config/'.$class.EXT); + include_once(APPPATH.'config/'.strtolower($class).EXT); + } + else + { + if (file_exists(APPPATH.'config/'.ucfirst(strtolower($class)).EXT)) + { + include_once(APPPATH.'config/'.ucfirst(strtolower($class)).EXT); + } } } -- cgit v1.2.3-24-g4f1b