aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-09-16 19:24:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-09-16 19:24:07 +0200
commitb3576d77da20acc65e5ec9456229e0f269f7d849 (patch)
treef60458a72f9b94d5f6b3f7fd45a365e0aee20031 /phpBB/includes/functions.php
parent0b4f714bc4aba25b69a0fa6d47e1666bf3ec6d4b (diff)
parentf4260e261ff03cbe1467f4c9400310bacf72ffff (diff)
downloadforums-b3576d77da20acc65e5ec9456229e0f269f7d849.tar
forums-b3576d77da20acc65e5ec9456229e0f269f7d849.tar.gz
forums-b3576d77da20acc65e5ec9456229e0f269f7d849.tar.bz2
forums-b3576d77da20acc65e5ec9456229e0f269f7d849.tar.xz
forums-b3576d77da20acc65e5ec9456229e0f269f7d849.zip
Merge pull request #2921 from Nicofuma/ticket/13034
[ticket/13034] Fix the route generated for the frontend not in the phpbb root path
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 1de70d4210..7dfaea6f48 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1989,6 +1989,9 @@ function tracking_unserialize($string, $max_depth = 3)
* @param mixed $params String or array of additional url parameters
* @param bool $is_amp Is url using &amp; (true) or & (false)
* @param string $session_id Possibility to use a custom session id instead of the global one
+* @param bool $is_route Is url generated by a route.
+*
+* @return string The corrected url.
*
* Examples:
* <code>
@@ -1999,7 +2002,7 @@ function tracking_unserialize($string, $max_depth = 3)
* </code>
*
*/
-function append_sid($url, $params = false, $is_amp = true, $session_id = false)
+function append_sid($url, $params = false, $is_amp = true, $session_id = false, $is_route = false)
{
global $_SID, $_EXTRA_URL, $phpbb_hook, $phpbb_path_helper;
global $phpbb_dispatcher;
@@ -2011,7 +2014,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
}
// Update the root path with the correct relative web path
- if ($phpbb_path_helper instanceof \phpbb\path_helper)
+ if (!$is_route && $phpbb_path_helper instanceof \phpbb\path_helper)
{
$url = $phpbb_path_helper->update_web_root_path($url);
}
@@ -2037,9 +2040,10 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
* the global one (false)
* @var bool|string append_sid_overwrite Overwrite function (string
* URL) or not (false)
+ * @var bool is_route Is url generated by a route.
* @since 3.1.0-a1
*/
- $vars = array('url', 'params', 'is_amp', 'session_id', 'append_sid_overwrite');
+ $vars = array('url', 'params', 'is_amp', 'session_id', 'append_sid_overwrite', 'is_route');
extract($phpbb_dispatcher->trigger_event('core.append_sid', compact($vars)));
if ($append_sid_overwrite)