diff options
author | admin <devnull@localhost> | 2006-09-20 23:11:04 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-20 23:11:04 +0200 |
commit | 480da81d6111a5c1faf4433707ee8d3b3de8031e (patch) | |
tree | d95b8fcff985d0f3d932d7b3390fd246cb8aa2c6 | |
parent | d183cb5255817dc431196964becef0db037f0620 (diff) |
-rw-r--r-- | system/libraries/Loader.php | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index a140fb5a2..ead55dff7 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -243,12 +243,21 @@ class CI_Loader { $helper = strtolower(str_replace(EXT, '', str_replace('_helper', '', $helper)).'_helper'); - if ( ! file_exists(BASEPATH.'helpers/'.$helper.EXT)) + if (file_exists(APPPATH.'helpers/'.$helper.EXT)) { - show_error('Unable to load the requested file: helpers/'.$helper.EXT); + include_once(APPPATH.'helpers/'.$helper.EXT); + } + else + { + if (file_exists(BASEPATH.'helpers/'.$helper.EXT)) + { + include_once(BASEPATH.'helpers/'.$helper.EXT); + } + else + { + show_error('Unable to load the requested file: helpers/'.$helper.EXT); + } } - - include_once(BASEPATH.'helpers/'.$helper.EXT); $this->helpers[$helper] = TRUE; } @@ -300,14 +309,23 @@ class CI_Loader { continue; } - $plugin = strtolower(str_replace(EXT, '', str_replace('_plugin.', '', $plugin)).'_pi'); + $plugin = strtolower(str_replace(EXT, '', str_replace('_plugin.', '', $plugin)).'_pi'); - if ( ! file_exists(BASEPATH.'plugins/'.$plugin.EXT)) + if (file_exists(APPPATH.'plugins/'.$plugin.EXT)) { - show_error('Unable to load the requested file: plugins/'.$plugin.EXT); + include_once(APPPATH.'plugins/'.$plugin.EXT); + } + else + { + if (file_exists(BASEPATH.'plugins/'.$plugin.EXT)) + { + include_once(BASEPATH.'plugins/'.$plugin.EXT); + } + else + { + show_error('Unable to load the requested file: plugins/'.$plugin.EXT); + } } - - include_once(BASEPATH.'plugins/'.$plugin.EXT); $this->plugins[$plugin] = TRUE; } |