diff options
author | Rubén Calvo <rubencm@gmail.com> | 2017-08-09 15:54:03 +0200 |
---|---|---|
committer | Rubén Calvo <rubencm@gmail.com> | 2018-05-01 10:47:11 +0200 |
commit | ef43dbdcca1c48dc43dcd033ce9b2ee8e67ce89b (patch) | |
tree | faf31fd7330915e116ea0d13634f29dfee43406c /phpBB/includes/functions_privmsgs.php | |
parent | [ticket/15286] Fix tests (diff) | |
download | phpbb-ef43dbdcca1c48dc43dcd033ce9b2ee8e67ce89b.tar.gz phpbb-ef43dbdcca1c48dc43dcd033ce9b2ee8e67ce89b.tar.bz2 phpbb-ef43dbdcca1c48dc43dcd033ce9b2ee8e67ce89b.zip |
[ticket/15286] Update use storage in avatars
PHPBB3-15286
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 444bf2c7e0..7a56a67d74 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1614,6 +1614,8 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true) { global $db, $auth, $config, $user, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $request; + $attachment_storage = $phpbb_container->get('storage.attachment'); + // We do not handle erasing pms here if ($mode == 'delete') { @@ -1881,7 +1883,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true) else { // insert attachment into db - if (!@file_exists($phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($orphan_rows[$attach_row['attach_id']]['physical_filename']))) + if (!$attachment_storage->exists(utf8_basename($orphan_rows[$attach_row['attach_id']]['physical_filename']))) { continue; } |