From b8846c9f630e1e1086a83e2b1ae20cb12335410b Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Fri, 10 Feb 2006 22:19:01 +0000 Subject: [PATCH] Let's see if we can make the support team's job a little easier..... Automagically remove http:// from the server name if someone tries to put it in there This should reduce the number of people who end up visiting microsoft.com on login :) git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5542 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_board.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index fee4fa79aa..3b63f6ea17 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -49,7 +49,14 @@ else if ($config_name == 'cookie_name') { - $cookie_name = str_replace('.', '_', $new['cookie_name']); + $new['cookie_name'] = str_replace('.', '_', $new['cookie_name']); + } + + // Attempt to prevent a common mistake with this value, + // http:// is the protocol and not part of the server name + if ($config_name == 'server_name') + { + $new['server_name'] = str_replace('http://', '', $new['server_name']); } if( isset($HTTP_POST_VARS['submit']) )