Cache-Control: public
so that would include files in private forums, PM's etc. Around line 200 in
includes/functions_download.php
is
Code: Select all
// Now the tricky part... let's dance
header('Cache-Control: public');
Code: Select all
if ($guest_user_can_view_this_file)
{
header('Cache-Control: public');
}
else
{
header('Cache-Control: private');
}
In file.php around line 220 I can see how to set a variable for PM's but I'm getting past my pay grade for the guest user.
Code: Select all
if (!$attachment['in_message'])
{
phpbb_download_handle_forum_auth($db, $auth, $attachment['topic_id']);
$sql = 'SELECT forum_id, post_visibility
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . (int) $attachment['post_msg_id'];
$result = $db->sql_query($sql);
$post_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$post_row || !$phpbb_content_visibility->is_visible('post', $post_row['forum_id'], $post_row))
{
// Attachment of a soft deleted post and the user is not allowed to see the post
send_status_line(404, 'Not Found');
trigger_error('ERROR_NO_ATTACHMENT');
}
}
else
{
// Attachment is in a private message.
$post_row = array('forum_id' => false);
phpbb_download_handle_pm_auth($db, $auth, $user->data['user_id'], $attachment['post_msg_id']);
}