aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-08-17 17:52:30 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-08-17 17:52:30 +0000
commitbf25f0df9ad172aa8353656441ace86cddecbb9d (patch)
tree6aafc8979c4423075e163d994ffc497bcedae221 /phpBB/includes/functions.php
parentc2a42988c78747e1a14459866809db75910b81cf (diff)
downloadforums-bf25f0df9ad172aa8353656441ace86cddecbb9d.tar
forums-bf25f0df9ad172aa8353656441ace86cddecbb9d.tar.gz
forums-bf25f0df9ad172aa8353656441ace86cddecbb9d.tar.bz2
forums-bf25f0df9ad172aa8353656441ace86cddecbb9d.tar.xz
forums-bf25f0df9ad172aa8353656441ace86cddecbb9d.zip
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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 42c7fb9fd0..3f9709ba42 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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