From f9547cd476e2a14594af56bc9b80a8f5a5715e23 Mon Sep 17 00:00:00 2001 From: ADmad Date: Tue, 24 Mar 2015 08:38:29 +0530 Subject: [PATCH] Apply url filters before merging current request's params. These allows greater control over the url manipulation. For eg. a filter can prevent the auto setting of "plugin" key based on current request. --- src/Routing/Router.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Routing/Router.php b/src/Routing/Router.php index 5415c690e50..f49f7d3fac6 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -594,6 +594,8 @@ public static function url($url = null, $full = false) unset($url['_ssl']); } + $url = static::_applyUrlFilters($url); + if (!isset($url['_name'])) { // Copy the current action if the controller is the current one. if (empty($url['action']) && @@ -615,7 +617,6 @@ public static function url($url = null, $full = false) ]; } - $url = static::_applyUrlFilters($url); $output = static::$_collection->match($url, static::$_requestContext + ['params' => $params]); } else { $plainString = (