diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-09 09:24:30 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-06-10 11:47:41 +0200 |
commit | 6980fbd27bd57dc01d7265cc742ab01a4bd9f93a (patch) | |
tree | b41a678373e62518ec34b139860031bf6dc5a4d4 /phpBB/phpbb/finder.php | |
parent | e1707b27ca8b998652fddee571197b24974ebb2f (diff) | |
download | forums-6980fbd27bd57dc01d7265cc742ab01a4bd9f93a.tar forums-6980fbd27bd57dc01d7265cc742ab01a4bd9f93a.tar.gz forums-6980fbd27bd57dc01d7265cc742ab01a4bd9f93a.tar.bz2 forums-6980fbd27bd57dc01d7265cc742ab01a4bd9f93a.tar.xz forums-6980fbd27bd57dc01d7265cc742ab01a4bd9f93a.zip |
[ticket/12508] Only take a list of names for set_extensions()
PHPBB3-12508
Diffstat (limited to 'phpBB/phpbb/finder.php')
-rw-r--r-- | phpBB/phpbb/finder.php | 14 |
1 files changed, 11 insertions, 3 deletions
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; } |