aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-05-27 16:40:25 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-05-27 16:40:25 +0000
commit2f0a6333aaa511ad1a35f8888395cb9f17b0c90d (patch)
treec4dfdbb9d50d87fa2265559b311485f40c8010b3 /phpBB/common.php
parent2d0f44daf4ac951b850fdea3d8e31c1fbd54a661 (diff)
downloadforums-2f0a6333aaa511ad1a35f8888395cb9f17b0c90d.tar
forums-2f0a6333aaa511ad1a35f8888395cb9f17b0c90d.tar.gz
forums-2f0a6333aaa511ad1a35f8888395cb9f17b0c90d.tar.bz2
forums-2f0a6333aaa511ad1a35f8888395cb9f17b0c90d.tar.xz
forums-2f0a6333aaa511ad1a35f8888395cb9f17b0c90d.zip
IP encoding now done in common no need to encode anywhere else
git-svn-id: file:///svn/phpbb/trunk@346 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php18
1 files changed, 15 insertions, 3 deletions
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("<br />", "\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);