aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/db')
-rw-r--r--phpBB/phpbb/db/log_wrapper_migrator_output_handler.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/log_wrapper_migrator_output_handler.php b/phpBB/phpbb/db/log_wrapper_migrator_output_handler.php
index 94c293dc45..4c85bf4d67 100644
--- a/phpBB/phpbb/db/log_wrapper_migrator_output_handler.php
+++ b/phpBB/phpbb/db/log_wrapper_migrator_output_handler.php
@@ -38,16 +38,23 @@ class log_wrapper_migrator_output_handler implements migrator_output_handler_int
protected $file_handle = false;
/**
+ * @var \phpbb\filesystem\filesystem_interface
+ */
+ protected $filesystem;
+
+ /**
* Constructor
*
* @param user $user User object
* @param migrator_output_handler_interface $migrator Migrator output handler
* @param string $log_file File to log to
+ * @param \phpbb\filesystem\filesystem_interface phpBB filesystem object
*/
- public function __construct(user $user, migrator_output_handler_interface $migrator, $log_file)
+ public function __construct(user $user, migrator_output_handler_interface $migrator, $log_file, \phpbb\filesystem\filesystem_interface $filesystem)
{
$this->user = $user;
$this->migrator = $migrator;
+ $this->filesystem = $filesystem;
$this->file_open($log_file);
}
@@ -58,7 +65,7 @@ class log_wrapper_migrator_output_handler implements migrator_output_handler_int
*/
protected function file_open($file)
{
- if (phpbb_is_writable(dirname($file)))
+ if ($this->filesystem->is_writable(dirname($file)))
{
$this->file_handle = fopen($file, 'w');
}