Vergleich attachment.php - 1.6.10 - 1.6.11

  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 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);

}
?>

}
?>