aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_privmsgs.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-09-23 10:43:33 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-09 10:18:40 +0200
commit98ebbbdca2b7a57136745354b204d9aef181df4a (patch)
treed6848504160f12e7762b472015c05fdfbce8459c /phpBB/includes/functions_privmsgs.php
parent04786313892df25f5adce555ebae6b2e5ad4d222 (diff)
downloadforums-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/functions_privmsgs.php')
-rw-r--r--phpBB/includes/functions_privmsgs.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 7b6540cda7..fa84a5ed3c 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1153,12 +1153,10 @@ function delete_pm($user_id, $msg_ids, $folder_id)
if (sizeof($delete_ids))
{
// Check if there are any attachments we need to remove
- if (!function_exists('delete_attachments'))
- {
- include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- }
-
- delete_attachments('message', $delete_ids, false);
+ /** @var \phpbb\attachment\delete $attachment_delete */
+ $attachment_delete = $phpbb_container->get('attachment.delete');
+ $attachment_delete->delete('message', $delete_ids, false);
+ unset($attachment_delete);
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
@@ -1363,12 +1361,10 @@ function phpbb_delete_users_pms($user_ids)
if (!empty($delete_ids))
{
// Check if there are any attachments we need to remove
- if (!function_exists('delete_attachments'))
- {
- include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- }
-
- delete_attachments('message', $delete_ids, false);
+ /** @var \phpbb\attachment\delete $attachment_delete */
+ $attachment_delete = $phpbb_container->get('attachment.delete');
+ $attachment_delete->delete('message', $delete_ids, false);
+ unset($attachment_delete);
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);