aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xphpBB/install/index.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 19649b31fb..565aff78ec 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -218,13 +218,20 @@ $auth = new auth();
$cache = new cache();
$template = new template();
-// Add own hook handler
-require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
-$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
+// Add own hook handler, if present. :o
+if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
+{
+ require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
+ $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
-foreach ($cache->obtain_hooks() as $hook)
+ foreach ($cache->obtain_hooks() as $hook)
+ {
+ @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
+ }
+}
+else
{
- @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
+ $phpbb_hook = false;
}
// Set some standard variables we want to force