Zeile 68 | Zeile 68 |
---|
if($db->fetch_field($query, "numreferences") == 0) { delete_uploaded_file($uploadspath_abs."/".$attachment['attachname']);
|
if($db->fetch_field($query, "numreferences") == 0) { delete_uploaded_file($uploadspath_abs."/".$attachment['attachname']);
|
if($attachment['thumbnail'])
| if($attachment['thumbnail'] && $attachment['thumbnail'] !== 'SMALL')
|
{ delete_uploaded_file($uploadspath_abs."/".$attachment['thumbnail']); }
| { delete_uploaded_file($uploadspath_abs."/".$attachment['thumbnail']); }
|
Zeile 283 | Zeile 283 |
---|
{ require_once MYBB_ROOT."inc/functions_image.php"; $thumbnail = generate_thumbnail($avatarpath."/".$filename, $avatarpath, $filename, $maxheight, $maxwidth);
|
{ require_once MYBB_ROOT."inc/functions_image.php"; $thumbnail = generate_thumbnail($avatarpath."/".$filename, $avatarpath, $filename, $maxheight, $maxwidth);
|
if(!$thumbnail['filename'])
| if(empty($thumbnail['filename']))
|
{ $ret['error'] = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); $ret['error'] .= "<br /><br />".$lang->error_avatarresizefailed;
| { $ret['error'] = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); $ret['error'] .= "<br /><br />".$lang->error_avatarresizefailed;
|
Zeile 467 | Zeile 467 |
---|
} $query = $db->simple_select("attachments", "*", "filename='".$db->escape_string($attachment['name'])."' AND ".$uploaded_query); $prevattach = $db->fetch_array($query);
|
} $query = $db->simple_select("attachments", "*", "filename='".$db->escape_string($attachment['name'])."' AND ".$uploaded_query); $prevattach = $db->fetch_array($query);
|
if(!empty($prevattach) && $prevattach['aid'] && $update_attachment == false)
| if($prevattach && $update_attachment == false)
|
{ if(!$mybb->usergroup['caneditattachments'] && !$forumpermissions['caneditattachments']) {
| { if(!$mybb->usergroup['caneditattachments'] && !$forumpermissions['caneditattachments']) {
|
Zeile 624 | Zeile 624 |
---|
$thumbnail = generate_thumbnail($uploadspath_abs."/".$filename, $uploadspath_abs, $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);
|
$thumbnail = generate_thumbnail($uploadspath_abs."/".$filename, $uploadspath_abs, $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);
|
if($thumbnail['filename'])
| if(!empty($thumbnail['filename']))
|
{ $attacharray['thumbnail'] = $thumbnail['filename']; }
| { $attacharray['thumbnail'] = $thumbnail['filename']; }
|
Zeile 644 | Zeile 644 |
---|
$attacharray = $plugins->run_hooks("upload_attachment_do_insert", $attacharray);
|
$attacharray = $plugins->run_hooks("upload_attachment_do_insert", $attacharray);
|
if(!empty($prevattach) && $prevattach['aid'] && $update_attachment == true)
| if($prevattach && $update_attachment == true)
|
{ unset($attacharray['downloads']); // Keep our download count if we're updating an attachment $db->update_query("attachments", $attacharray, "aid='".$db->escape_string($prevattach['aid'])."'");
| { unset($attacharray['downloads']); // Keep our download count if we're updating an attachment $db->update_query("attachments", $attacharray, "aid='".$db->escape_string($prevattach['aid'])."'");
|
Zeile 823 | Zeile 823 |
---|
} else if(isset($attachedfile['aid']) && $mybb->get_input('ajax', MyBB::INPUT_INT) == 1) {
|
} else if(isset($attachedfile['aid']) && $mybb->get_input('ajax', MyBB::INPUT_INT) == 1) {
|
$ret['success'][] = array($attachedfile['aid'], get_attachment_icon(get_extension($filename)), $filename, get_friendly_size($FILE['size']));
| $ret['success'][] = array($attachedfile['aid'], get_attachment_icon(get_extension($filename)), htmlspecialchars_uni($filename), get_friendly_size($FILE['size']));
|
} } }
| } } }
|