diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-08 15:20:57 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-08 15:20:57 +0000 |
commit | 1c41450bd90f86f47521952e7f48339f103b8e5d (patch) | |
tree | 3ec8b226ce76e5ba5de810e7e1325047851f3716 /phpBB/includes/functions.php | |
parent | 4519c510663b5c5168d6594d9eb96819a0c6bae0 (diff) | |
download | forums-1c41450bd90f86f47521952e7f48339f103b8e5d.tar forums-1c41450bd90f86f47521952e7f48339f103b8e5d.tar.gz forums-1c41450bd90f86f47521952e7f48339f103b8e5d.tar.bz2 forums-1c41450bd90f86f47521952e7f48339f103b8e5d.tar.xz forums-1c41450bd90f86f47521952e7f48339f103b8e5d.zip |
- re-add script_path for "strange configurations" to let them force the generated urls correctly
- show rank title if no rank image present in memberlist
- other fixes.
git-svn-id: file:///svn/phpbb/trunk@6730 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3b0cd9a055..4c417cc03e 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1451,6 +1451,7 @@ function generate_board_url($without_script_path = false) $server_protocol = ($config['server_protocol']) ? $config['server_protocol'] : (($config['cookie_secure']) ? 'https://' : 'http://'); $server_name = $config['server_name']; $server_port = (int) $config['server_port']; + $script_path = $config['script_path']; $url = $server_protocol . $server_name; } @@ -1459,6 +1460,8 @@ function generate_board_url($without_script_path = false) // Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection $cookie_secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0; $url = (($cookie_secure) ? 'https://' : 'http://') . $server_name; + + $script_path = $user->page['root_script_path']; } if ($server_port && (($config['cookie_secure'] && $server_port <> 443) || (!$config['cookie_secure'] && $server_port <> 80))) @@ -1466,13 +1469,18 @@ function generate_board_url($without_script_path = false) $url .= ':' . $server_port; } - if ($without_script_path) + if (!$without_script_path) { - return $url; + $url .= $script_path; } // Strip / from the end - return $url . substr($user->page['root_script_path'], 0, -1); + if (substr($url, -1, 1) == '/') + { + $url = substr($url, 0, -1); + } + + return $url; } /** |