diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-19 01:07:31 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-19 01:07:31 +0200 |
commit | f59c31ec2b1556d3f3aa3239a5c0150c9bbcf190 (patch) | |
tree | 774f56991fd18dc989f92b0c5be2263f01140949 /system | |
parent | c59cc79a92d3d8f795048056024fa1c4ce4d7e6f (diff) |
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
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Loader.php | 13 |
1 files changed, 11 insertions, 2 deletions
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);
+ }
}
}
|