From 480da81d6111a5c1faf4433707ee8d3b3de8031e Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 20 Sep 2006 21:11:04 +0000 Subject: --- system/libraries/Loader.php | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'system/libraries/Loader.php') 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; } -- cgit v1.2.3-24-g4f1b