1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00
git-svn-id: file:///svn/phpbb/trunk@8113 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-09-26 16:53:40 +00:00
parent cb85c2c57c
commit b2afdc0704
4 changed files with 41 additions and 3 deletions

View File

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