aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/routing
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-02-26 13:41:51 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-02-26 13:41:51 +0100
commitc9df29d680990d83fe2380e79a7bd5833f0cac34 (patch)
treeccc4b685816311077c2002a3583d95266860e85d /phpBB/phpbb/routing
parent261c3bc1d06a05ec7c0c18288b1a04a35819ec12 (diff)
parent6842831d6baa59425ec83cc2ebbae377942824ce (diff)
downloadforums-c9df29d680990d83fe2380e79a7bd5833f0cac34.tar
forums-c9df29d680990d83fe2380e79a7bd5833f0cac34.tar.gz
forums-c9df29d680990d83fe2380e79a7bd5833f0cac34.tar.bz2
forums-c9df29d680990d83fe2380e79a7bd5833f0cac34.tar.xz
forums-c9df29d680990d83fe2380e79a7bd5833f0cac34.zip
Merge pull request #3303 from Nicofuma/ticket/13513
[ticket/13513] Use paths relative to the phpBB root in the router
Diffstat (limited to 'phpBB/phpbb/routing')
-rw-r--r--phpBB/phpbb/routing/router.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/phpbb/routing/router.php b/phpBB/phpbb/routing/router.php
index 40a829b73f..4ccd3cf5e3 100644
--- a/phpBB/phpbb/routing/router.php
+++ b/phpBB/phpbb/routing/router.php
@@ -107,25 +107,25 @@ class router implements RouterInterface
/**
* Find the list of routing files
*
- * @param array $paths Array of paths where to look for routing files.
+ * @param array $paths Array of paths where to look for routing files (they must be relative to the phpBB root path).
* @return router
*/
public function find_routing_files(array $paths)
{
- $this->routing_files = array($this->phpbb_root_path . 'config/' . $this->environment . '/routing/environment.yml');
+ $this->routing_files = array('config/' . $this->environment . '/routing/environment.yml');
foreach ($paths as $path)
{
- if (file_exists($path . 'config/' . $this->environment . '/routing/environment.yml'))
+ if (file_exists($this->phpbb_root_path . $path . 'config/' . $this->environment . '/routing/environment.yml'))
{
$this->routing_files[] = $path . 'config/' . $this->environment . '/routing/environment.yml';
}
- else if (!is_dir($path . 'config/' . $this->environment))
+ else if (!is_dir($this->phpbb_root_path . $path . 'config/' . $this->environment))
{
- if (file_exists($path . 'config/default/routing/environment.yml'))
+ if (file_exists($this->phpbb_root_path . $path . 'config/default/routing/environment.yml'))
{
$this->routing_files[] = $path . 'config/default/routing/environment.yml';
}
- else if (!is_dir($path . 'config/default/routing') && file_exists($path . 'config/routing.yml'))
+ else if (!is_dir($this->phpbb_root_path . $path . 'config/default/routing') && file_exists($this->phpbb_root_path . $path . 'config/routing.yml'))
{
$this->routing_files[] = $path . 'config/routing.yml';
}
@@ -165,7 +165,7 @@ class router implements RouterInterface
{
if ($this->route_collection == null || empty($this->routing_files))
{
- $this->find_routing_files($this->extension_manager->all_enabled())
+ $this->find_routing_files($this->extension_manager->all_enabled(false))
->find($this->phpbb_root_path);
}