aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-11-22 12:43:31 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-11-22 12:43:31 +0000
commit97d5bdb5d969fc54e0fb9edbeb9a11e352293e0a (patch)
treeac1f61a53a6ac2919f0011cacb3240da43a8ceb5 /phpBB/includes/functions_admin.php
parent3cb634c796ee0095b011ab69a773da89b8d8c18c (diff)
downloadforums-97d5bdb5d969fc54e0fb9edbeb9a11e352293e0a.tar
forums-97d5bdb5d969fc54e0fb9edbeb9a11e352293e0a.tar.gz
forums-97d5bdb5d969fc54e0fb9edbeb9a11e352293e0a.tar.bz2
forums-97d5bdb5d969fc54e0fb9edbeb9a11e352293e0a.tar.xz
forums-97d5bdb5d969fc54e0fb9edbeb9a11e352293e0a.zip
jada jada
git-svn-id: file:///svn/phpbb/trunk@4677 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index fcfbaabd50..c1a7069533 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -331,6 +331,11 @@ function move_posts($post_ids, $topic_id, $auto_sync = TRUE)
WHERE post_id IN (" . implode(', ', $post_ids) . ')';
$db->sql_query($sql);
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
+ SET topic_id = $topic_id
+ WHERE post_id IN (" . implode(', ', $post_ids) . ')';
+ $db->sql_query($sql);
+
if ($auto_sync)
{
$forum_ids[] = $row['forum_id'];
@@ -565,6 +570,11 @@ function delete_attachments($mode, $ids, $resync = TRUE)
$db->sql_query('DELETE FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $sql_id . ' IN (' . implode(', ', $ids) . ')');
$num_deleted = $db->sql_affectedrows();
+ if (!$num_deleted)
+ {
+ return 0;
+ }
+
// Delete attachments from filesystem
$space_removed = $files_removed = 0;
foreach ($physical as $file_ary)