aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/extension
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/extension')
-rw-r--r--phpBB/includes/extension/finder.php2
-rw-r--r--phpBB/includes/extension/manager.php14
2 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/extension/finder.php b/phpBB/includes/extension/finder.php
index ee08b0a82a..9a0727a50c 100644
--- a/phpBB/includes/extension/finder.php
+++ b/phpBB/includes/extension/finder.php
@@ -161,6 +161,8 @@ class phpbb_extension_finder
*/
public function directory($directory)
{
+ $directory = preg_replace('#(?:^|/)\./#', '/', $directory);
+
if (strlen($directory) > 1 && $directory[strlen($directory) - 1] === '/')
{
$directory = substr($directory, 0, -1);
diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php
index a6c8ebb3d0..ef714638c3 100644
--- a/phpBB/includes/extension/manager.php
+++ b/phpBB/includes/extension/manager.php
@@ -93,7 +93,7 @@ class phpbb_extension_manager
*/
public function get_extension_path($name)
{
- return $this->phpbb_root_path . 'ext/' . basename($name) . '/';
+ return 'ext/' . basename($name) . '/';
}
/**
@@ -315,7 +315,13 @@ class phpbb_extension_manager
*/
public function all_configured()
{
- return $this->extensions;
+ $configured = array();
+ foreach ($this->extensions as $name => $data)
+ {
+ $data['ext_path'] = $this->phpbb_root_path . $data['ext_path'];
+ $configured[$name] = $data;
+ }
+ return $configured;
}
/**
@@ -331,7 +337,7 @@ class phpbb_extension_manager
{
if ($data['ext_active'])
{
- $enabled[$name] = $data['ext_path'];
+ $enabled[$name] = $this->phpbb_root_path . $data['ext_path'];
}
}
return $enabled;
@@ -350,7 +356,7 @@ class phpbb_extension_manager
{
if (!$data['ext_active'])
{
- $disabled[$name] = $data['ext_path'];
+ $disabled[$name] = $this->phpbb_root_path . $data['ext_path'];
}
}
return $disabled;