Vergleich attachment.php - 1.6.10 - 1.6.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 61Zeile 61
}

// Error if attachment is invalid or not visible

}

// Error if attachment is invalid or not visible

if(!$attachment['aid'] || !$attachment['attachname'] || (!is_moderator($fid) && $attachment['visible'] != 1))

if(!$attachment['aid'] || !$attachment['attachname'] || (!is_moderator($fid) && ($attachment['visible'] != 1 || $thread['visible'] != 1 || $post['visible'] != 1)))

{
error($lang->error_invalidattachment);
}

{
error($lang->error_invalidattachment);
}

Zeile 107Zeile 107
	header("Content-type: ".$type);
$thumb = $mybb->settings['uploadspath']."/".$attachment['thumbnail'];
header("Content-length: ".@filesize($thumb));

	header("Content-type: ".$type);
$thumb = $mybb->settings['uploadspath']."/".$attachment['thumbnail'];
header("Content-length: ".@filesize($thumb));

	echo file_get_contents($thumb);






	$handle = fopen($thumb, 'rb');
while(!feof($handle))
{
echo fread($handle, 8192);
}
fclose($handle);

}
else
{

}
else
{

Zeile 136Zeile 141

header("Content-type: {$filetype}");
$disposition = "attachment";


header("Content-type: {$filetype}");
$disposition = "attachment";

	}

	}


if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "msie") !== false)
{
header("Content-disposition: attachment; filename=\"{$attachment['filename']}\"");


if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "msie") !== false)
{
header("Content-disposition: attachment; filename=\"{$attachment['filename']}\"");

	}

	}

	else
{
header("Content-disposition: {$disposition}; filename=\"{$attachment['filename']}\"");

	else
{
header("Content-disposition: {$disposition}; filename=\"{$attachment['filename']}\"");

Zeile 153Zeile 158
	}

header("Content-length: {$attachment['filesize']}");

	}

header("Content-length: {$attachment['filesize']}");

	header("Content-range: bytes=0-".($attachment['filesize']-1)."/".$attachment['filesize']); 
echo file_get_contents($mybb->settings['uploadspath']."/".$attachment['attachname']);






	header("Content-range: bytes=0-".($attachment['filesize']-1)."/".$attachment['filesize']);
$handle = fopen($mybb->settings['uploadspath']."/".$attachment['attachname'], 'rb');
while(!feof($handle))
{
echo fread($handle, 8192);
}
fclose($handle);

}
?>

}
?>