phpBB

Code Changes

File: includes/functions_download.php

  Unmodified   Added   Modified   Removed
Line 108Line 108
	echo '<html>';
echo '<head>';
echo '<meta charset="utf-8">';

	echo '<html>';
echo '<head>';
echo '<meta charset="utf-8">';

 
	echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';

	echo '<title>' . $title . '</title>';
echo '</head>';
echo '<body>';

	echo '<title>' . $title . '</title>';
echo '</head>';
echo '<body>';

Line 165Line 166
	}

// Make sure the database record for the filesize is correct

	}

// Make sure the database record for the filesize is correct

	if ($size > 0 && $size != $attachment['filesize'])

	if ($size > 0 && $size != $attachment['filesize'] && strpos($attachment['physical_filename'], 'thumb_') === false)

	{
// Update database record
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '

	{
// Update database record
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '

Line 208Line 209
				header('X-Download-Options: noopen');
}
}

				header('X-Download-Options: noopen');
}
}

	}

if ($size)
{
header("Content-Length: $size");

 
	}

// Close the db connection before sending the file etc.

	}

// Close the db connection before sending the file etc.

Line 236Line 232
			// and always requires an absolute path.
header('X-Sendfile: ' . dirname(__FILE__) . "/../$upload_dir/{$attachment['physical_filename']}");
exit;

			// and always requires an absolute path.
header('X-Sendfile: ' . dirname(__FILE__) . "/../$upload_dir/{$attachment['physical_filename']}");
exit;

 
		}

if ($size)
{
header("Content-Length: $size");

		}

// Try to deliver in chunks

		}

// Try to deliver in chunks

Line 283Line 284

// There be dragons here.
// Not many follows the RFC...


// There be dragons here.
// Not many follows the RFC...

	if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)

	if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Konqueror') !== false)

	{
return "filename=" . rawurlencode($file);
}

	{
return "filename=" . rawurlencode($file);
}

Line 412Line 413
	global $request;

// let's see if we have to send the file at all

	global $request;

// let's see if we have to send the file at all

	$last_load 	=  $request->header('Modified-Since') ? strtotime(trim($request->header('Modified-Since'))) : false;

	$last_load 	=  $request->header('If-Modified-Since') ? strtotime(trim($request->header('If-Modified-Since'))) : false;


if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
{


if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
{