diff options
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/extension/manager.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/finder.php | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index bfc6e19b5b..b83bb1b189 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -542,11 +542,11 @@ class manager $finder = new \phpbb\finder($this->filesystem, $this->phpbb_root_path, $this->cache, $this->php_ext, $this->cache_name . '_finder'); if ($use_all_available) { - $finder->set_extensions($this->all_available()); + $finder->set_extensions(array_keys($this->all_available())); } else { - $finder->set_extensions($this->all_enabled()); + $finder->set_extensions(array_keys($this->all_enabled())); } return $finder; } diff --git a/phpBB/phpbb/finder.php b/phpBB/phpbb/finder.php index 899dc4f290..77a8222b84 100644 --- a/phpBB/phpbb/finder.php +++ b/phpBB/phpbb/finder.php @@ -80,12 +80,20 @@ class finder /** * Set the array of extensions * - * @param array $extensions A list of extensions that should be searched aswell + * @param array $extensions A list of extensions that should be searched aswell + * @param bool $replace_list Should the list be emptied before adding the extensions * @return \phpbb\finder This object for chaining calls */ - public function set_extensions(array $extensions) + public function set_extensions(array $extensions, $replace_list = true) { - $this->extensions = $extensions; + if ($replace_list) + { + $this->extensions = array(); + } + foreach ($extensions as $ext_name) + { + $this->extensions[$ext_name] = $this->phpbb_root_path . 'ext/' . $ext_name . '/'; + } return $this; } |