Zeile 21 | Zeile 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 47 | Zeile 47 |
---|
{ error($lang->error_invalidattachment); }
|
{ error($lang->error_invalidattachment); }
|
| if($attachment['thumbnail'] == '' && isset($mybb->input['thumbnail'])) { error($lang->error_invalidattachment); }
|
$pid = $attachment['pid'];
// Don't check the permissions on preview
| $pid = $attachment['pid'];
// Don't check the permissions on preview
|
Zeile 74 | Zeile 80 |
---|
// Error if attachment is invalid or not visible if(!$attachment['attachname'] || (!is_moderator($fid, "canviewunapprove") && ($attachment['visible'] != 1 || $thread['visible'] != 1 || $post['visible'] != 1)))
|
// Error if attachment is invalid or not visible if(!$attachment['attachname'] || (!is_moderator($fid, "canviewunapprove") && ($attachment['visible'] != 1 || $thread['visible'] != 1 || $post['visible'] != 1)))
|
{ error($lang->error_invalidattachment); } }
| { error($lang->error_invalidattachment); } }
|
if(!isset($mybb->input['thumbnail'])) // Only increment the download count if this is not a thumbnail {
| if(!isset($mybb->input['thumbnail'])) // Only increment the download count if this is not a thumbnail {
|
Zeile 94 | Zeile 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 129 | Zeile 140 |
---|
} else {
|
} 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'])
|