summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-22 13:29:10 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-22 13:29:10 +0200
commit20292311636837e120d205e470e41826820feb46 (patch)
treebb9fa90e5b249369f6ad1e0e635e8ef3e2fdd13d /system/core/Loader.php
parent2d536f848dae5b1781bdfbdaf914fed1010e72bf (diff)
Change class filenames to Ucfirst
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php31
1 files changed, 15 insertions, 16 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 70a6b6fa6..535c9e4db 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -261,33 +261,32 @@ class CI_Loader {
show_error('The model name you are loading is the name of a resource that is already being used: '.$name);
}
- $model = strtolower($model);
-
- foreach ($this->_ci_model_paths as $mod_path)
+ if ($db_conn !== FALSE && ! class_exists('CI_DB', FALSE))
{
- if ( ! file_exists($mod_path.'models/'.$path.$model.'.php'))
+ if ($db_conn === TRUE)
{
- continue;
+ $db_conn = '';
}
- if ($db_conn !== FALSE && ! class_exists('CI_DB', FALSE))
- {
- if ($db_conn === TRUE)
- {
- $db_conn = '';
- }
+ $CI->load->database($db_conn, FALSE, TRUE);
+ }
- $CI->load->database($db_conn, FALSE, TRUE);
- }
+ if ( ! class_exists('CI_Model', FALSE))
+ {
+ load_class('Model', 'core');
+ }
+
+ $model = ucfirst(strtolower($model));
- if ( ! class_exists('CI_Model', FALSE))
+ foreach ($this->_ci_model_paths as $mod_path)
+ {
+ if ( ! file_exists($mod_path.'models/'.$path.$model.'.php'))
{
- load_class('Model', 'core');
+ continue;
}
require_once($mod_path.'models/'.$path.$model.'.php');
- $model = ucfirst($model);
$CI->$name = new $model();
$this->_ci_models[] = $name;
return;