diff --git a/phpBB/common.php b/phpBB/common.php index 2e954adad4..6950bdbee8 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -6,7 +6,11 @@ * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * +<<<<<<< common.php * $Id$ +======= + * $Id$ +>>>>>>> 1.24 * * ***************************************************************************/ @@ -24,11 +28,14 @@ // // Define some basic configuration arrays +// this also prevents malicious rewriting +// of language array values via URI params // $board_config = Array(); $userdata = Array(); $theme = Array(); $images = Array(); +$lang = Array(); include('config.'.$phpEx); include('includes/constants.'.$phpEx); @@ -51,9 +58,6 @@ $images['posticon'] = "$url_images/posticon.gif"; $images['folder'] = "$url_images/folder.gif"; $images['latest_reply'] = "$url_images/latest_reply.gif"; -// Find Users real IP (if possible) -$user_ip = ($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR; - include('includes/template.inc'); include('includes/error.'.$phpEx); @@ -62,6 +66,10 @@ include('includes/auth.'.$phpEx); include('includes/functions.'.$phpEx); include('includes/db.'.$phpEx); +// Obtain and encode users IP +//$get_user_ip = ; +$user_ip = encode_ip(($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR); + // // Setup forum wide options. // This is also the first DB query/connect @@ -95,8 +103,10 @@ else $board_config['sitename'] = stripslashes($config['sitename']); $board_config['allow_html'] = $config['allow_html']; $board_config['allow_bbcode'] = $config['allow_bbcode']; + $board_config['allow_smilies'] = $config['allow_smilies']; $board_config['allow_sig'] = $config['allow_sig']; $board_config['allow_namechange'] = $config['allow_namechange']; + $board_config['allow_avatar_upload'] = $config['allow_avatar_upload']; $board_config['require_activation'] = $config['require_activation']; $board_config['override_user_themes'] = $config['override_themes']; $board_config['posts_per_page'] = $config['posts_per_page']; @@ -109,6 +119,8 @@ else $board_config['board_email'] = stripslashes(str_replace("
", "\n", $config['email_sig'])); $board_config['board_email_from'] = stripslashes($config['email_from']); $board_config['flood_interval'] = $config['flood_interval']; + $board_config['avatar_filesize'] = $config['avatar_filesize']; + $board_config['avatar_path'] = $config['avatar_path']; } include('language/lang_'.$board_config['default_lang'].'.'.$phpEx);