diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-21 19:23:34 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-21 19:23:34 +0000 |
| commit | 21de871aff0392803dd98ab8a895fabac35f4219 (patch) | |
| tree | aa052fe762be977462e92b755e59dacb0c4ea559 /phpBB/includes/ucp/ucp_pm_viewmessage.php | |
| parent | 44c60cff4de351523f950ca7fac114d1a2769b82 (diff) | |
| download | forums-21de871aff0392803dd98ab8a895fabac35f4219.tar forums-21de871aff0392803dd98ab8a895fabac35f4219.tar.gz forums-21de871aff0392803dd98ab8a895fabac35f4219.tar.bz2 forums-21de871aff0392803dd98ab8a895fabac35f4219.tar.xz forums-21de871aff0392803dd98ab8a895fabac35f4219.zip | |
- a bunch of bugfixes. :P
git-svn-id: file:///svn/phpbb/trunk@5678 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_viewmessage.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 8b9d4d859d..bb8a89a879 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -118,6 +118,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // Assign inline attachments if (isset($attachments) && sizeof($attachments)) { + $update_count = array(); $unset_attachments = parse_inline_attachments($message, $attachments, $update_count, 0); // Needed to let not display the inlined attachments at the end of the message again @@ -125,6 +126,15 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { unset($attachments[$index]); } + + // Update the attachment download counts + if (sizeof($update_count)) + { + $sql = 'UPDATE ' . ATTACHMENTS_TABLE . ' + SET download_count = download_count + 1 + WHERE attach_id IN (' . implode(', ', array_unique($update_count)) . ')'; + $db->sql_query($sql); + } } $user_info['sig'] = ''; |
