diff options
author | Andrey Andreev <narf@bofh.bg> | 2013-01-29 14:05:02 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2013-01-29 14:05:02 +0100 |
commit | 0687911229be13e100724dbf8b15b95146b591a9 (patch) | |
tree | 0a843814096d353120efd4a2e648cc3cab05293e /system/core/Hooks.php | |
parent | c26d34ff12458760eb843454d3224e1dad1fb2e0 (diff) |
Replace is_file() with the faster file_exists()
(where it makes sense)
Also:
- Implemented caching of configuration arrays for smileys, foreign characters and doctypes.
- Implemented cascading-style loading of configuration files (except for library configs, DB and constants.php).
Diffstat (limited to 'system/core/Hooks.php')
-rw-r--r-- | system/core/Hooks.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 59759e02e..17f6a027e 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -81,11 +81,12 @@ class CI_Hooks { } // Grab the "hooks" definition file. - if (is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php')) + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php')) { include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'); } - elseif (is_file(APPPATH.'config/hooks.php')) + + if (file_exists(APPPATH.'config/hooks.php')) { include(APPPATH.'config/hooks.php'); } |