aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/extension/manager.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2015-01-17 11:05:18 +0100
committerTristan Darricau <github@nicofuma.fr>2015-01-17 11:40:10 +0100
commit6842831d6baa59425ec83cc2ebbae377942824ce (patch)
tree991136c6fc7b063d5fabe64750c9e1f7db433ba8 /phpBB/phpbb/extension/manager.php
parent0344e61b8cd5d3964bcfae147e2bebc8c74fa3be (diff)
downloadforums-6842831d6baa59425ec83cc2ebbae377942824ce.tar
forums-6842831d6baa59425ec83cc2ebbae377942824ce.tar.gz
forums-6842831d6baa59425ec83cc2ebbae377942824ce.tar.bz2
forums-6842831d6baa59425ec83cc2ebbae377942824ce.tar.xz
forums-6842831d6baa59425ec83cc2ebbae377942824ce.zip
[ticket/13513] Use paths relative to the phpBB root in the router
PHPBB3-13513
Diffstat (limited to 'phpBB/phpbb/extension/manager.php')
-rw-r--r--phpBB/phpbb/extension/manager.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index 76f0e3558e..880973d5fb 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -464,15 +464,17 @@ class manager
* All enabled and disabled extensions are considered configured. A purged
* extension that is no longer in the database is not configured.
*
+ * @param bool $phpbb_relative Whether the path should be relative to phpbb root
+ *
* @return array An array with extension names as keys and and the
* database stored extension information as values
*/
- public function all_configured()
+ public function all_configured($phpbb_relative = true)
{
$configured = array();
foreach ($this->extensions as $name => $data)
{
- $data['ext_path'] = $this->phpbb_root_path . $data['ext_path'];
+ $data['ext_path'] = ($phpbb_relative ? $this->phpbb_root_path : '') . $data['ext_path'];
$configured[$name] = $data;
}
return $configured;
@@ -480,18 +482,19 @@ class manager
/**
* Retrieves all enabled extensions.
+ * @param bool $phpbb_relative Whether the path should be relative to phpbb root
*
* @return array An array with extension names as keys and and the
* database stored extension information as values
*/
- public function all_enabled()
+ public function all_enabled($phpbb_relative = true)
{
$enabled = array();
foreach ($this->extensions as $name => $data)
{
if ($data['ext_active'])
{
- $enabled[$name] = $this->phpbb_root_path . $data['ext_path'];
+ $enabled[$name] = ($phpbb_relative ? $this->phpbb_root_path : '') . $data['ext_path'];
}
}
return $enabled;
@@ -500,17 +503,19 @@ class manager
/**
* Retrieves all disabled extensions.
*
+ * @param bool $phpbb_relative Whether the path should be relative to phpbb root
+ *
* @return array An array with extension names as keys and and the
* database stored extension information as values
*/
- public function all_disabled()
+ public function all_disabled($phpbb_relative = true)
{
$disabled = array();
foreach ($this->extensions as $name => $data)
{
if (!$data['ext_active'])
{
- $disabled[$name] = $this->phpbb_root_path . $data['ext_path'];
+ $disabled[$name] = ($phpbb_relative ? $this->phpbb_root_path : '') . $data['ext_path'];
}
}
return $disabled;