diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-09-23 10:43:33 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-10-09 10:18:40 +0200 |
commit | 98ebbbdca2b7a57136745354b204d9aef181df4a (patch) | |
tree | d6848504160f12e7762b472015c05fdfbce8459c /phpBB/includes/acp/acp_attachments.php | |
parent | 04786313892df25f5adce555ebae6b2e5ad4d222 (diff) | |
download | forums-98ebbbdca2b7a57136745354b204d9aef181df4a.tar forums-98ebbbdca2b7a57136745354b204d9aef181df4a.tar.gz forums-98ebbbdca2b7a57136745354b204d9aef181df4a.tar.bz2 forums-98ebbbdca2b7a57136745354b204d9aef181df4a.tar.xz forums-98ebbbdca2b7a57136745354b204d9aef181df4a.zip |
[ticket/14168] No longer use deprecated functions in core files
PHPBB3-14168
Diffstat (limited to 'phpBB/includes/acp/acp_attachments.php')
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 7ff9846a75..49b8ea462c 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -39,6 +39,9 @@ class acp_attachments /** @var \phpbb\filesystem\filesystem_interface */ protected $filesystem; + /** @var \phpbb\attachment\delete */ + protected $attachment_delete; + public $id; public $u_action; protected $new_config; @@ -55,6 +58,7 @@ class acp_attachments $this->user = $user; $this->phpbb_container = $phpbb_container; $this->filesystem = $phpbb_filesystem; + $this->attachment_delete = $phpbb_container->get('attachment.delete'); $user->add_lang(array('posting', 'viewtopic', 'acp/attachments')); @@ -922,11 +926,11 @@ class acp_attachments $delete_files = array(); while ($row = $db->sql_fetchrow($result)) { - phpbb_unlink($row['physical_filename'], 'file'); + $this->attachment_delete->unlink_attachment($row['physical_filename'], 'file'); if ($row['thumbnail']) { - phpbb_unlink($row['physical_filename'], 'thumbnail'); + $this->attachment_delete->unlink_attachment($row['physical_filename'], 'thumbnail'); } $delete_files[$row['attach_id']] = $row['real_filename']; @@ -1091,7 +1095,7 @@ class acp_attachments } $db->sql_freeresult($result); - if ($num_deleted = delete_attachments('attach', $delete_files)) + if ($num_deleted = $this->attachment_delete->delete('attach', $delete_files)) { if (sizeof($delete_files) != $num_deleted) { |