1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

[ticket/15286] Update use storage in avatars

PHPBB3-15286
This commit is contained in:
Rubén Calvo
2017-08-09 15:54:03 +02:00
parent e564ca6e60
commit ef43dbdcca
12 changed files with 41 additions and 65 deletions

View File

@@ -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;
}