aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-04-16 20:44:02 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-04-16 20:44:02 +0200
commitf077b72d0ddabd13350bea276069b68d5df4a89c (patch)
treed072352cd49d016b203a2e1de5464cfd9b9dd0c8 /phpBB/phpbb/db
parentdb9ef52fdd40e2ae8118f458bd12eda540b57bd3 (diff)
parent4bdef6fd21a5dcab455b0cd1ee2652de606929c3 (diff)
downloadforums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar.gz
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar.bz2
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar.xz
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.zip
Merge pull request #3487 from MateBartus/ticket/13697
[ticket/13697] Moving filesystem related functions to filesystem service
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');
}