mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 22:40:39 +02:00
Merge pull request #2092 from nickvergessen/ticket/12090
[ticket/12090] Pass route name to url() instead of the url itself
This commit is contained in:
@@ -53,8 +53,8 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $
|
||||
*/
|
||||
function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext)
|
||||
{
|
||||
$provider = new \phpbb\controller\provider();
|
||||
$routes = $provider->import_paths_from_finder($finder)->find($root_path);
|
||||
$provider = new \phpbb\controller\provider($finder);
|
||||
$routes = $provider->find($root_path)->get_routes();
|
||||
$dumper = new PhpMatcherDumper($routes);
|
||||
$cached_url_matcher_dump = $dumper->dump(array(
|
||||
'class' => 'phpbb_url_matcher',
|
||||
@@ -72,8 +72,8 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_
|
||||
*/
|
||||
function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path)
|
||||
{
|
||||
$provider = new \phpbb\controller\provider();
|
||||
$routes = $provider->import_paths_from_finder($finder)->find($root_path);
|
||||
$provider = new \phpbb\controller\provider($finder);
|
||||
$routes = $provider->find($root_path)->get_routes();
|
||||
return new UrlMatcher($routes, $context);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user