aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_attachments.php12
-rw-r--r--phpBB/includes/acp/acp_forums.php8
-rw-r--r--phpBB/includes/acp/acp_users.php16
-rw-r--r--phpBB/includes/functions_admin.php24
-rw-r--r--phpBB/includes/functions_posting.php8
-rw-r--r--phpBB/includes/functions_privmsgs.php16
-rw-r--r--phpBB/includes/message_parser.php22
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php8
8 files changed, 57 insertions, 57 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 49b8ea462c..e2090f3cd5 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -39,8 +39,8 @@ class acp_attachments
/** @var \phpbb\filesystem\filesystem_interface */
protected $filesystem;
- /** @var \phpbb\attachment\delete */
- protected $attachment_delete;
+ /** @var \phpbb\attachment\manager */
+ protected $attachment_manager;
public $id;
public $u_action;
@@ -58,7 +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');
+ $this->attachment_manager = $phpbb_container->get('attachment.manager');
$user->add_lang(array('posting', 'viewtopic', 'acp/attachments'));
@@ -926,11 +926,11 @@ class acp_attachments
$delete_files = array();
while ($row = $db->sql_fetchrow($result))
{
- $this->attachment_delete->unlink_attachment($row['physical_filename'], 'file');
+ $this->attachment_manager->unlink($row['physical_filename'], 'file');
if ($row['thumbnail'])
{
- $this->attachment_delete->unlink_attachment($row['physical_filename'], 'thumbnail');
+ $this->attachment_manager->unlink($row['physical_filename'], 'thumbnail');
}
$delete_files[$row['attach_id']] = $row['real_filename'];
@@ -1095,7 +1095,7 @@ class acp_attachments
}
$db->sql_freeresult($result);
- if ($num_deleted = $this->attachment_delete->delete('attach', $delete_files))
+ if ($num_deleted = $this->attachment_manager->delete('attach', $delete_files))
{
if (sizeof($delete_files) != $num_deleted)
{
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 905a885a56..5d20664b31 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1809,10 +1809,10 @@ class acp_forums
}
$db->sql_freeresult($result);
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('topic', $topic_ids, false);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('topic', $topic_ids, false);
+ unset($attachment_manager);
// Delete shadow topics pointing to topics in this forum
delete_topic_shadows($forum_id);
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index ab0eda507e..f26c0d3f93 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -543,10 +543,10 @@ class acp_users
if (confirm_box(true))
{
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('user', $user_id);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('user', $user_id);
+ unset($attachment_manager);
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_ATTACH', false, array($user_row['username']));
trigger_error($user->lang['USER_ATTACHMENTS_REMOVED'] . adm_back_link($this->u_action . '&u=' . $user_id));
@@ -2129,10 +2129,10 @@ class acp_users
}
$db->sql_freeresult($result);
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('attach', $marked);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('attach', $marked);
+ unset($attachment_manager);
$message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index d44c60e5ec..bca451deb6 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1024,10 +1024,10 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
$search->index_remove($post_ids, $poster_ids, $forum_ids);
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('post', $post_ids, false);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('post', $post_ids, false);
+ unset($attachment_manager);
/**
* Perform additional actions during post(s) deletion
@@ -1124,11 +1124,11 @@ function delete_attachments($mode, $ids, $resync = true)
{
global $phpbb_container;
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $num_deleted = $attachment_manager->delete($mode, $ids, $resync);
- $num_deleted = $attachment_delete->delete($mode, $ids, $resync);
- unset($attachment_delete);
+ unset($attachment_manager);
return $num_deleted;
}
@@ -1253,10 +1253,10 @@ function phpbb_unlink($filename, $mode = 'file', $entry_removed = false)
{
global $phpbb_container;
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $unlink = $attachment_delete->unlink_attachment($filename, $mode, $entry_removed);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $unlink = $attachment_manager->unlink($filename, $mode, $entry_removed);
+ unset($attachment_manager);
return $unlink;
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index c39b9470a3..297ac80170 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -406,10 +406,10 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
{
global $phpbb_container;
- /** @var \phpbb\attachment\upload $attachment_upload */
- $attachment_upload = $phpbb_container->get('attachment.upload');
- $file = $attachment_upload->upload($form_name, $forum_id, $local, $local_storage, $is_message, $local_filedata);
- unset($attachment_upload);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $file = $attachment_manager->upload($form_name, $forum_id, $local, $local_storage, $is_message, $local_filedata);
+ unset($attachment_manager);
return $file;
}
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index fa84a5ed3c..ee18e85657 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1153,10 +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
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('message', $delete_ids, false);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('message', $delete_ids, false);
+ unset($attachment_manager);
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
@@ -1361,10 +1361,10 @@ function phpbb_delete_users_pms($user_ids)
if (!empty($delete_ids))
{
// Check if there are any attachments we need to remove
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('message', $delete_ids, false);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('message', $delete_ids, false);
+ unset($attachment_manager);
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 05ab115141..059037168d 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1571,9 +1571,9 @@ class parse_message extends bbcode_firstpass
{
if ($num_attachments < $cfg['max_attachments'] || $auth->acl_get('a_') || $auth->acl_get('m_', $forum_id))
{
- /** @var \phpbb\attachment\upload $attachment_upload */
- $attachment_upload = $phpbb_container->get('attachment.upload');
- $filedata = $attachment_upload->upload($form_name, $forum_id, false, '', $is_message);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $filedata = $attachment_manager->upload($form_name, $forum_id, false, '', $is_message);
$error = $filedata['error'];
if ($filedata['post_attach'] && !sizeof($error))
@@ -1643,8 +1643,8 @@ 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');
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
// delete selected attachment
if ($this->attachment_data[$index]['is_orphan'])
@@ -1660,11 +1660,11 @@ class parse_message extends bbcode_firstpass
if ($row)
{
- $attachment_delete->unlink_attachment($row['physical_filename'], 'file');
+ $attachment_manager->unlink($row['physical_filename'], 'file');
if ($row['thumbnail'])
{
- $attachment_delete->unlink_attachment($row['physical_filename'], 'thumbnail');
+ $attachment_manager->unlink($row['physical_filename'], 'thumbnail');
}
$db->sql_query('DELETE FROM ' . ATTACHMENTS_TABLE . ' WHERE attach_id = ' . (int) $this->attachment_data[$index]['attach_id']);
@@ -1672,7 +1672,7 @@ class parse_message extends bbcode_firstpass
}
else
{
- $attachment_delete->delete('attach', $this->attachment_data[$index]['attach_id']);
+ $attachment_manager->delete('attach', $this->attachment_data[$index]['attach_id']);
}
unset($this->attachment_data[$index]);
@@ -1692,9 +1692,9 @@ class parse_message extends bbcode_firstpass
{
if ($num_attachments < $cfg['max_attachments'] || $auth->acl_gets('m_', 'a_', $forum_id))
{
- /** @var \phpbb\attachment\upload $attachment_upload */
- $attachment_upload = $phpbb_container->get('attachment.upload');
- $filedata = $attachment_upload->upload($form_name, $forum_id, false, '', $is_message);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $filedata = $attachment_manager->upload($form_name, $forum_id, false, '', $is_message);
$error = array_merge($error, $filedata['error']);
if (!sizeof($error))
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index 64cad1aa90..b8cb3c4100 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -70,10 +70,10 @@ class ucp_attachments
if (confirm_box(true))
{
- /** @var \phpbb\attachment\delete $attachment_delete */
- $attachment_delete = $phpbb_container->get('attachment.delete');
- $attachment_delete->delete('attach', $delete_ids);
- unset($attachment_delete);
+ /** @var \phpbb\attachment\manager $attachment_manager */
+ $attachment_manager = $phpbb_container->get('attachment.manager');
+ $attachment_manager->delete('attach', $delete_ids);
+ unset($attachment_manager);
meta_refresh(3, $this->u_action);
$message = ((sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');