summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-20 23:11:04 +0200
committeradmin <devnull@localhost>2006-09-20 23:11:04 +0200
commit480da81d6111a5c1faf4433707ee8d3b3de8031e (patch)
treed95b8fcff985d0f3d932d7b3390fd246cb8aa2c6 /system
parentd183cb5255817dc431196964becef0db037f0620 (diff)
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Loader.php36
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;
}