Skip to content
Permalink
Browse files

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.
  • Loading branch information...
ADmad committed Mar 24, 2015
1 parent ee53820 commit f9547cd476e2a14594af56bc9b80a8f5a5715e23
Showing with 2 additions and 1 deletion.
  1. +2 −1 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 = (

0 comments on commit f9547cd

Please sign in to comment.
You can’t perform that action at this time.