Vergleich attachment.php - 1.8.3 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 21Zeile 21
// Find the AID we're looking for
if(isset($mybb->input['thumbnail']))
{

// Find the AID we're looking for
if(isset($mybb->input['thumbnail']))
{

	$aid = $mybb->get_input('thumbnail', 1);

	$aid = $mybb->get_input('thumbnail', MyBB::INPUT_INT);

}
else
{

}
else
{

	$aid = $mybb->get_input('aid', 1);

	$aid = $mybb->get_input('aid', MyBB::INPUT_INT);

}


}


$pid = $mybb->get_input('pid', 1);

$pid = $mybb->get_input('pid', MyBB::INPUT_INT);


// Select attachment data from database
if($aid)


// Select attachment data from database
if($aid)

Zeile 100Zeile 100

if(isset($mybb->input['thumbnail']))
{


if(isset($mybb->input['thumbnail']))
{

 
	if(!file_exists($mybb->settings['uploadspath']."/".$attachment['thumbnail']))
{
error($lang->error_invalidattachment);
}


	$ext = get_extension($attachment['thumbnail']);
switch($ext)
{

	$ext = get_extension($attachment['thumbnail']);
switch($ext)
{

Zeile 108Zeile 113
			break;
case "bmp":
$type = "image/bmp";

			break;
case "bmp":
$type = "image/bmp";

			break;

			break;

		case "png":
$type = "image/png";
break;

		case "png":
$type = "image/png";
break;

Zeile 120Zeile 125
		default:
$type = "image/unknown";
break;

		default:
$type = "image/unknown";
break;

	}


	}


	header("Content-disposition: filename=\"{$attachment['filename']}\"");
header("Content-type: ".$type);
$thumb = $mybb->settings['uploadspath']."/".$attachment['thumbnail'];

	header("Content-disposition: filename=\"{$attachment['filename']}\"");
header("Content-type: ".$type);
$thumb = $mybb->settings['uploadspath']."/".$attachment['thumbnail'];

Zeile 130Zeile 135
	while(!feof($handle))
{
echo fread($handle, 8192);

	while(!feof($handle))
{
echo fread($handle, 8192);

	}

	}

	fclose($handle);
}
else
{

	fclose($handle);
}
else
{

 
	if(!file_exists($mybb->settings['uploadspath']."/".$attachment['attachname']))
{
error($lang->error_invalidattachment);
}


	$ext = get_extension($attachment['filename']);

switch($attachment['filetype'])

	$ext = get_extension($attachment['filename']);

switch($attachment['filetype'])