Change order of hooks loading
Let override hooks via environment-specific config.
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 57e4a99..4ec7698 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -99,16 +99,16 @@
}
// Grab the "hooks" definition file.
- if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
- {
- include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
- }
-
if (file_exists(APPPATH.'config/hooks.php'))
{
include(APPPATH.'config/hooks.php');
}
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
+ }
+
// If there are no hooks, we're done.
if ( ! isset($hook) OR ! is_array($hook))
{