From 3b0cdc53629c3a852762ae9b96b809cf4b1af2c4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 Mar 2013 15:21:15 +0100 Subject: [ticket/11334] Allow parameters to be specified in the route PHPBB3-11334 --- phpBB/includes/controller/helper.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/controller/helper.php b/phpBB/includes/controller/helper.php index 1464267711..46c6307cb4 100644 --- a/phpBB/includes/controller/helper.php +++ b/phpBB/includes/controller/helper.php @@ -95,6 +95,13 @@ class phpbb_controller_helper */ public function url($route, $params = false, $is_amp = true, $session_id = false) { + $route_params = ''; + if (($route_delim = strpos($route, '?')) !== false) + { + $route_params = substr($route, $route_delim); + $route = substr($route, 0, $route_delim); + } + if (is_array($params) && !empty($params)) { $params = array_merge(array( @@ -110,7 +117,7 @@ class phpbb_controller_helper $params = array('controller' => $route); } - return append_sid($this->phpbb_root_path . 'app' . $this->php_ext, $params, $is_amp, $session_id); + return append_sid($this->phpbb_root_path . 'app' . $this->php_ext . $route_params, $params, $is_amp, $session_id); } /** -- cgit v1.2.1