aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/extension
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/extension')
-rw-r--r--phpBB/phpbb/extension/finder.php13
-rw-r--r--phpBB/phpbb/extension/manager.php2
2 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php
index 338f1cdeb9..d3e73bc387 100644
--- a/phpBB/phpbb/extension/finder.php
+++ b/phpBB/phpbb/extension/finder.php
@@ -277,15 +277,16 @@ class finder
$classes = array();
foreach ($files as $file => $ext_name)
{
- if (preg_match('#^includes/#', $file))
+ $class = substr($file, 0, -strlen('.' . $this->php_ext));
+ if ($ext_name === '/' && preg_match('#^includes/#', $file))
{
- $file = preg_replace('#^includes/#', '', $file);
- $classes[] = 'phpbb_' . str_replace('/', '_', substr($file, 0, -strlen('.' . $this->php_ext)));
+ $class = preg_replace('#^includes/#', '', $class);
+ $classes[] = 'phpbb_' . str_replace('/', '_', $class);
}
else
- {
- $file = preg_replace('#^phpbb/#', '', $file);
- $classes[] = 'phpbb\\' . str_replace('/', '\\', substr($file, 0, -strlen('.' . $this->php_ext)));
+ {
+ $class = preg_replace('#^ext/#', '', $class);
+ $classes[] = str_replace('/', '\\', $class);
}
}
return $classes;
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index d174146f52..ce6d7e05c8 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -133,7 +133,7 @@ class manager
*/
public function get_extension($name)
{
- $extension_class_name = 'phpbb_ext_' . str_replace('/', '_', $name) . '_ext';
+ $extension_class_name = str_replace('/', '\\', $name) . '\\ext';
$migrator = $this->container->get('migrator');