mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 12:30:42 +02:00
Fix Bug #57375 - Do not delete unrelated attachments when deleting empty forums.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10526 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -913,7 +913,13 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
if (is_array($ids) && sizeof($ids))
|
||||
// 0 is as bad as an empty array
|
||||
if (empty($ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_array($ids))
|
||||
{
|
||||
$ids = array_unique($ids);
|
||||
$ids = array_map('intval', $ids);
|
||||
@@ -923,11 +929,6 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
$ids = array((int) $ids);
|
||||
}
|
||||
|
||||
if (!sizeof($ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql_where = '';
|
||||
|
||||
switch ($mode)
|
||||
|
Reference in New Issue
Block a user