aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:47:43 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:47:43 +0000
commit02a5032a52784339e75d0d3fc9c24e92e235c26b (patch)
tree7be064ec5e37c3a81e35971a7f7d8c5519388f6c /phpBB/includes/acp
parentc34599126fe8a7d38b604ceb92136be6a6c89ee8 (diff)
downloadforums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar.gz
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar.bz2
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar.xz
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.zip
merging... again
git-svn-id: file:///svn/phpbb/trunk@8452 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 120c6a789f..d2beba55c5 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -947,6 +947,7 @@ class acp_attachments
AND is_orphan = 1';
$result = $db->sql_query($sql);
+ $files_added = $space_taken = 0;
while ($row = $db->sql_fetchrow($result))
{
$post_row = $post_info[$upload_list[$row['attach_id']]];
@@ -986,9 +987,18 @@ class acp_attachments
WHERE topic_id = ' . $post_row['topic_id'];
$db->sql_query($sql);
+ $space_taken += $row['filesize'];
+ $files_added++;
+
add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']);
}
$db->sql_freeresult($result);
+
+ if ($files_added)
+ {
+ set_config('upload_dir_size', $config['upload_dir_size'] + $space_taken, true);
+ set_config('num_files', $config['num_files'] + $files_added, true);
+ }
}
}