mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11948] Use basename and dirname
PHPBB3-11948
This commit is contained in:
parent
d45582d32a
commit
bd86dea16c
1 changed files with 2 additions and 6 deletions
|
@ -75,12 +75,8 @@ class provider
|
|||
$routes = new RouteCollection;
|
||||
foreach ($this->routing_files as $file_path)
|
||||
{
|
||||
$path_info = explode('/', $file_path);
|
||||
$file_name = array_pop($path_info);
|
||||
$path = implode('/', $path_info) . '/';
|
||||
|
||||
$loader = new YamlFileLoader(new FileLocator($base_path . $path));
|
||||
$routes->addCollection($loader->load($file_name));
|
||||
$loader = new YamlFileLoader(new FileLocator(dirname($base_path . $file_path)));
|
||||
$routes->addCollection($loader->load(basename($file_path)));
|
||||
}
|
||||
|
||||
return $routes;
|
||||
|
|
Loading…
Add table
Reference in a new issue