diff options
author | Fyorl <gaelreth@gmail.com> | 2012-08-14 13:02:12 +0100 |
---|---|---|
committer | Fyorl <gaelreth@gmail.com> | 2012-08-14 13:02:12 +0100 |
commit | 5c9b3208f5095c585548e9882c322e40d0f8883e (patch) | |
tree | a8c6595c3c703ad232166f016a2b3089bcf86dc3 /phpBB/download | |
parent | 003f8b514bc1345b95859ced087f90fdf87b3b7a (diff) | |
download | forums-5c9b3208f5095c585548e9882c322e40d0f8883e.tar forums-5c9b3208f5095c585548e9882c322e40d0f8883e.tar.gz forums-5c9b3208f5095c585548e9882c322e40d0f8883e.tar.bz2 forums-5c9b3208f5095c585548e9882c322e40d0f8883e.tar.xz forums-5c9b3208f5095c585548e9882c322e40d0f8883e.zip |
[feature/attach-dl] Removed reliance on current($row)
PHPBB3-11042
Diffstat (limited to 'phpBB/download')
-rw-r--r-- | phpBB/download/file.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 94dbb9bb51..15fcd5c9db 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -323,20 +323,20 @@ else { if ($attachment['in_message']) { - $sql = 'SELECT message_subject + $sql = 'SELECT message_subject AS attach_subject FROM ' . PRIVMSGS_TABLE . " WHERE msg_id = $post_id"; } else { - $sql = 'SELECT post_subject, forum_id + $sql = 'SELECT post_subject AS attach_subject, forum_id FROM ' . POSTS_TABLE . " WHERE post_id = $post_id"; } } else { - $sql = 'SELECT topic_title, forum_id + $sql = 'SELECT topic_title AS attach_subject, forum_id FROM ' . TOPICS_TABLE . " WHERE topic_id = $topic_id"; } @@ -351,7 +351,7 @@ else trigger_error('ERROR_NO_ATTACHMENT'); } - $clean_name = phpbb_download_clean_filename(current($row)); + $clean_name = phpbb_download_clean_filename($row['attach_subject']); $suffix = '_' . (($post_id) ? $post_id : $topic_id) . '_' . $clean_name; $store_name = 'att_' . time() . '_' . unique_id(); |