[ticket/10848] Move include up.

PHPBB3-10848
This commit is contained in:
Oleg Pudeyev 2012-10-17 22:35:36 -04:00
parent bb09cd9c8e
commit b283df8241

View file

@ -26,6 +26,8 @@ if (file_exists($phpbb_root_path . 'config.' . $phpEx))
if (!defined('PHPBB_INSTALLED')) if (!defined('PHPBB_INSTALLED'))
{ {
// Redirect the user to the installer // Redirect the user to the installer
require($phpbb_root_path . 'includes/functions.' . $phpEx);
// We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information // We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information
// available as used by the redirect function // available as used by the redirect function
$server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
@ -44,7 +46,6 @@ if (!defined('PHPBB_INSTALLED'))
// (could happen on some proxy setups and/or Windows servers) // (could happen on some proxy setups and/or Windows servers)
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path); $script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
// Eliminate . and .. from the path // Eliminate . and .. from the path
require($phpbb_root_path . 'includes/functions.' . $phpEx);
$script_path = phpbb_clean_path($script_path); $script_path = phpbb_clean_path($script_path);
$url = (($secure) ? 'https://' : 'http://') . $server_name; $url = (($secure) ? 'https://' : 'http://') . $server_name;