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/message_parser.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/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index a56ef0d4a9..05ab115141 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1643,6 +1643,9 @@ class parse_message extends bbcode_firstpass if ($index !== false && !empty($this->attachment_data[$index])) { + /** @var \phpbb\attachment\delete $attachment_delete */ + $attachment_delete = $phpbb_container->get('attachment.delete'); + // delete selected attachment if ($this->attachment_data[$index]['is_orphan']) { @@ -1657,11 +1660,11 @@ class parse_message extends bbcode_firstpass if ($row) { - phpbb_unlink($row['physical_filename'], 'file'); + $attachment_delete->unlink_attachment($row['physical_filename'], 'file'); if ($row['thumbnail']) { - phpbb_unlink($row['physical_filename'], 'thumbnail'); + $attachment_delete->unlink_attachment($row['physical_filename'], 'thumbnail'); } $db->sql_query('DELETE FROM ' . ATTACHMENTS_TABLE . ' WHERE attach_id = ' . (int) $this->attachment_data[$index]['attach_id']); @@ -1669,7 +1672,7 @@ class parse_message extends bbcode_firstpass } else { - delete_attachments('attach', array(intval($this->attachment_data[$index]['attach_id']))); + $attachment_delete->delete('attach', $this->attachment_data[$index]['attach_id']); } unset($this->attachment_data[$index]); |