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
This commit is contained in:
Graham Eames 2006-02-10 22:19:01 +00:00
parent b54eadac39
commit b8846c9f63

View file

@ -49,7 +49,14 @@ else
if ($config_name == 'cookie_name') 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']) ) if( isset($HTTP_POST_VARS['submit']) )