From 6e2d395da9fd3f2d641e368eea40322df7159955 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 23 Sep 2007 11:10:17 +0000 Subject: [PATCH] cope with updates too git-svn-id: file:///svn/phpbb/trunk@8103 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/index.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 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'))); - -foreach ($cache->obtain_hooks() as $hook) +// Add own hook handler, if present. :o +if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) { - @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $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) + { + @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); + } +} +else +{ + $phpbb_hook = false; } // Set some standard variables we want to force