diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-04-17 17:50:44 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-04-17 17:50:44 +0200 |
commit | 158bce02095b1fbff19955cbad19be3d1b1a3f80 (patch) | |
tree | a9b897e6b17cfb3268ae151322690fc2bd983e62 /phpBB | |
parent | 869e00a23b0400b9ad81c1130227cc4c29d6a38d (diff) | |
download | forums-158bce02095b1fbff19955cbad19be3d1b1a3f80.tar forums-158bce02095b1fbff19955cbad19be3d1b1a3f80.tar.gz forums-158bce02095b1fbff19955cbad19be3d1b1a3f80.tar.bz2 forums-158bce02095b1fbff19955cbad19be3d1b1a3f80.tar.xz forums-158bce02095b1fbff19955cbad19be3d1b1a3f80.zip |
[ticket/11362] Use new filesystem class in finder
PHPBB3-11362
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/extension/finder.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/includes/extension/finder.php b/phpBB/includes/extension/finder.php index d9aacc38ff..02a9ebb8c3 100644 --- a/phpBB/includes/extension/finder.php +++ b/phpBB/includes/extension/finder.php @@ -23,6 +23,7 @@ if (!defined('IN_PHPBB')) class phpbb_extension_finder { protected $extension_manager; + protected $filesystem; protected $phpbb_root_path; protected $cache; protected $php_ext; @@ -54,15 +55,17 @@ class phpbb_extension_finder * @param phpbb_extension_manager $extension_manager An extension manager * instance that provides the finder with a list of active * extensions and their locations + * @param phpbb_filesystem $filesystem Filesystem instance * @param string $phpbb_root_path Path to the phpbb root directory * @param phpbb_cache_driver_interface $cache A cache instance or null * @param string $php_ext php file extension * @param string $cache_name The name of the cache variable, defaults to * _ext_finder */ - public function __construct(phpbb_extension_manager $extension_manager, $phpbb_root_path = '', phpbb_cache_driver_interface $cache = null, $php_ext = '.php', $cache_name = '_ext_finder') + public function __construct(phpbb_extension_manager $extension_manager, phpbb_filesystem $filesystem, $phpbb_root_path = '', phpbb_cache_driver_interface $cache = null, $php_ext = '.php', $cache_name = '_ext_finder') { $this->extension_manager = $extension_manager; + $this->filesystem = $filesystem; $this->phpbb_root_path = $phpbb_root_path; $this->cache = $cache; $this->php_ext = $php_ext; @@ -227,7 +230,7 @@ class phpbb_extension_finder */ protected function sanitise_directory($directory) { - $directory = phpbb_clean_path($directory); + $directory = $this->filesystem->clean_path($directory); $dir_len = strlen($directory); if ($dir_len > 1 && $directory[$dir_len - 1] === '/') |