mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Fixed: removes the ending slash if the script path is empty resulting in a double slash in the URL
git-svn-id: file:///svn/phpbb/trunk@4412 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c2a42988c7
commit
bf25f0df9a
1 changed files with 3 additions and 1 deletions
|
@ -864,7 +864,9 @@ function generate_board_url()
|
|||
{
|
||||
global $config;
|
||||
|
||||
return (($config['cookie_secure']) ? 'https://' : 'http://') . preg_replace('#^/?(.*?)/?$#', '\1', trim($config['server_name'])) . (($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/') . preg_replace('#^/?(.*?)/?$#', '\1', trim($config['script_path']));
|
||||
$path = preg_replace('#^/?(.*?)/?$#', '\1', trim($config['script_path']));
|
||||
|
||||
return (($config['cookie_secure']) ? 'https://' : 'http://') . preg_replace('#^/?(.*?)/?$#', '\1', trim($config['server_name'])) . (($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '') . (($path) ? '/' . $path : '');
|
||||
}
|
||||
|
||||
// Redirects the user to another page then exits the script nicely
|
||||
|
|
Loading…
Add table
Reference in a new issue