mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
Now the code is fixed for real :D Not smart to use config info before it's read
git-svn-id: file:///svn/phpbb/trunk@2182 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
dc729b7120
commit
ae80afa875
1 changed files with 21 additions and 19 deletions
|
@ -152,6 +152,25 @@ else
|
|||
}
|
||||
$user_ip = encode_ip($client_ip);
|
||||
|
||||
//
|
||||
// Setup forum wide options, if this fails
|
||||
// then we output a CRITICAL_ERROR since
|
||||
// basic forum information is not available
|
||||
//
|
||||
$sql = "SELECT *
|
||||
FROM " . CONFIG_TABLE;
|
||||
if(!$result = $db->sql_query($sql))
|
||||
{
|
||||
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
while($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$board_config[$row['config_name']] = $row['config_value'];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Set some server variables related to the current URL, mostly used for Email
|
||||
//
|
||||
|
@ -189,7 +208,7 @@ else
|
|||
$server_name = "";
|
||||
}
|
||||
|
||||
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . $board_config['server_port'] . '/' : '/';
|
||||
$server_port = ( !empty($board_config['server_port']) && $board_config['server_port'] <> 80 ) ? ':' . $board_config['server_port'] : '';
|
||||
|
||||
if ( !empty($HTTP_SERVER_VARS['PHP_SELF']) || !empty($HTTP_ENV_VARS['PHP_SELF']) )
|
||||
{
|
||||
|
@ -206,26 +225,9 @@ else if ( !empty($HTTP_SERVER_VARS['PATH_INFO']) || !empty($HTTP_ENV_VARS['PATH_
|
|||
|
||||
$script_url = $server_protocol . $server_name . $server_port . $script_name;
|
||||
|
||||
|
||||
//
|
||||
// Setup forum wide options, if this fails
|
||||
// then we output a CRITICAL_ERROR since
|
||||
// basic forum information is not available
|
||||
// Show 'Board is disabled' message if needed.
|
||||
//
|
||||
$sql = "SELECT *
|
||||
FROM " . CONFIG_TABLE;
|
||||
if(!$result = $db->sql_query($sql))
|
||||
{
|
||||
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
while($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$board_config[$row['config_name']] = $row['config_value'];
|
||||
}
|
||||
}
|
||||
|
||||
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
|
||||
|
|
Loading…
Add table
Reference in a new issue