aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-12-10 17:44:45 +0000
committerNils Adermann <naderman@naderman.de>2006-12-10 17:44:45 +0000
commitf40e2aba2261aaf79ee3b5ebe87b71dd6d30d1cb (patch)
tree9b8bf50649470ecd571d06ee5c7f7eeb91a867c7 /phpBB/develop
parent7e47135792a2cbf7e25ccdd184b4934b2a9e764d (diff)
downloadforums-f40e2aba2261aaf79ee3b5ebe87b71dd6d30d1cb.tar
forums-f40e2aba2261aaf79ee3b5ebe87b71dd6d30d1cb.tar.gz
forums-f40e2aba2261aaf79ee3b5ebe87b71dd6d30d1cb.tar.bz2
forums-f40e2aba2261aaf79ee3b5ebe87b71dd6d30d1cb.tar.xz
forums-f40e2aba2261aaf79ee3b5ebe87b71dd6d30d1cb.zip
- finally correctly calculate current time for birthday calculation [Bug #6030]
- allow searching forums with unsearchable subforums [Bug #6056] - addition of an optional HTTP_X_FORWARDED_FOR check in sessions, including bans - do not index forums which have indexing disabled on index recreation [Bug #6060] - properly handle html entities in the theme editor [Bug #6048] - anonymous access is no longer required for the LDAP auth plugin [Bug #6046] - corrected mcp_front queue link to point to approve_details [Bug #6134] - added direct (dis)approval to mcp_front queue items [Bug #6134] - proper mysql version test for fulltext-compatibility [Bug #6054] - added note to style/language "used by" column so it's clear that bots are included - correctly update bot last visit time [Bug #6108] git-svn-id: file:///svn/phpbb/trunk@6740 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/develop')
-rw-r--r--phpBB/develop/create_schema_files.php1
-rw-r--r--phpBB/develop/ip_regex.php37
2 files changed, 38 insertions, 0 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index cc657f7829..3b51a15bd4 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1488,6 +1488,7 @@ function get_schema_struct()
'session_time' => array('TIMESTAMP', 0),
'session_ip' => array('VCHAR:40', ''),
'session_browser' => array('VCHAR:150', ''),
+ 'session_forwarded_for' => array('VCHAR:255', ''),
'session_page' => array('VCHAR_UNI', ''),
'session_viewonline' => array('BOOL', 1),
'session_autologin' => array('BOOL', 0),
diff --git a/phpBB/develop/ip_regex.php b/phpBB/develop/ip_regex.php
new file mode 100644
index 0000000000..4e7aaf0156
--- /dev/null
+++ b/phpBB/develop/ip_regex.php
@@ -0,0 +1,37 @@
+<?php
+$dec_octet = '(?:\d?\d|1\d\d|2[0-4]\d|25[0-5])';
+$h16 = '[\dA-F]{1,4}';
+$ipv4 = "(?:$dec_octet\.){3}$dec_octet";
+$ls32 = "(?:$h16:$h16|$ipv4)";
+
+$ipv6_construct = array(
+ array(false, '', '{6}', $ls32),
+ array(false, '::', '{5}', $ls32),
+ array('', ':', '{4}', $ls32),
+ array('{1,2}', ':', '{3}', $ls32),
+ array('{1,3}', ':', '{2}', $ls32),
+ array('{1,4}', ':', '', $ls32),
+ array('{1,5}', ':', false, $ls32),
+ array('{1,6}', ':', false, $h16),
+ array('{1,7}', ':', false, '')
+);
+
+$ipv6 = '(?:';
+foreach ($ipv6_construct as $ip_type)
+{
+ $ipv6 .= '(?:';
+ if ($ip_type[0] !== false)
+ {
+ $ipv6 .= "(?:$h16:)" . $ip_type[0];
+ }
+ $ipv6 .= $ip_type[1];
+ if ($ip_type[2] !== false)
+ {
+ $ipv6 .= "(?:$h16:)" . $ip_type[2];
+ }
+ $ipv6 .= $ip_type[3] . ')|';
+}
+$ipv6 = substr($ipv6, 0, -1) . ')';
+
+echo 'IPv4: ' . $ipv4 . "<br />\nIPv6: " . $ipv6;
+?> \ No newline at end of file