mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
#i53
git-svn-id: file:///svn/phpbb/trunk@8113 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -29,6 +29,24 @@ class ucp_attachments
|
||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
||||
$delete_ids = array_keys(request_var('attachment', array(0)));
|
||||
|
||||
if ($delete && sizeof($delete_ids))
|
||||
{
|
||||
// Validate $delete_ids...
|
||||
$sql = 'SELECT attach_id
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE poster_id = ' . $user->data['user_id'] . '
|
||||
AND is_orphan = 0
|
||||
AND ' . $db->sql_in_set('attach_id', $delete_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$delete_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$delete_ids[] = $row['attach_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if ($delete && sizeof($delete_ids))
|
||||
{
|
||||
$s_hidden_fields = array(
|
||||
@@ -46,6 +64,7 @@ class ucp_attachments
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
delete_attachments('attach', $delete_ids);
|
||||
|
||||
meta_refresh(3, $this->u_action);
|
||||
|
Reference in New Issue
Block a user