aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download/file.php
diff options
context:
space:
mode:
authorFyorl <gaelreth@gmail.com>2012-08-17 16:16:02 +0100
committerFyorl <gaelreth@gmail.com>2012-08-17 16:16:02 +0100
commit53aadd60a66c813db90aa1d54e649384679f2614 (patch)
tree056e0d4dac2a645e5f176c2ea9cc8991d2a592ba /phpBB/download/file.php
parent884a213d55bfbe06b3c3d63f4596a9a52801a399 (diff)
downloadforums-53aadd60a66c813db90aa1d54e649384679f2614.tar
forums-53aadd60a66c813db90aa1d54e649384679f2614.tar.gz
forums-53aadd60a66c813db90aa1d54e649384679f2614.tar.bz2
forums-53aadd60a66c813db90aa1d54e649384679f2614.tar.xz
forums-53aadd60a66c813db90aa1d54e649384679f2614.zip
[feature/attach-dl] Renamed $post_id to $post_msg_id
PHPBB3-11042
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r--phpBB/download/file.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 701405f3d4..5563e34cda 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -135,7 +135,7 @@ require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
$download_id = request_var('id', 0);
$topic_id = $request->variable('topic_id', 0);
-$post_id = $request->variable('post_id', 0);
+$post_msg_id = $request->variable('post_msg_id', 0);
$archive = $request->variable('archive', '.tar');
$mode = request_var('mode', '');
$thumbnail = request_var('t', false);
@@ -156,10 +156,10 @@ if ($download_id)
// Attachment id (only 1 attachment)
$sql_where = "attach_id = $download_id";
}
-else if ($post_id)
+else if ($post_msg_id)
{
// Post id or private message id (multiple attachments)
- $sql_where = "post_msg_id = $post_id AND is_orphan = 0";
+ $sql_where = "post_msg_id = $post_msg_id AND is_orphan = 0";
}
else if ($topic_id)
{
@@ -319,19 +319,19 @@ else
$archive = '.tar';
}
- if ($post_id)
+ if ($post_msg_id)
{
if ($attachment['in_message'])
{
$sql = 'SELECT message_subject AS attach_subject
FROM ' . PRIVMSGS_TABLE . "
- WHERE msg_id = $post_id";
+ WHERE msg_id = $post_msg_id";
}
else
{
$sql = 'SELECT post_subject AS attach_subject, forum_id
FROM ' . POSTS_TABLE . "
- WHERE post_id = $post_id";
+ WHERE post_id = $post_msg_id";
}
}
else
@@ -352,7 +352,7 @@ else
}
$clean_name = phpbb_download_clean_filename($row['attach_subject']);
- $suffix = '_' . (($post_id) ? $post_id : $topic_id) . '_' . $clean_name;
+ $suffix = '_' . (($post_msg_id) ? $post_msg_id : $topic_id) . '_' . $clean_name;
$archive_name = 'attachments' . $suffix;
$store_name = 'att_' . time() . '_' . unique_id();