Zeile 229 | Zeile 229 |
---|
}
// If there's an attachment, check it and upload it
|
}
// If there's an attachment, check it and upload it
|
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0)
| if($forumpermissions['canpostattachments'] != 0)
|
{
|
{
|
$query = $db->simple_select("attachments", "aid", "filename='".$db->escape_string($_FILES['attachment']['name'])."' AND {$attachwhere}"); $updateattach = $db->fetch_field($query, "aid");
require_once MYBB_ROOT."inc/functions_upload.php";
$update_attachment = false; if($updateattach > 0 && $mybb->get_input('updateattachment'))
| // If attachment exists.. if(!empty($_FILES['attachment']['name']) && !empty($_FILES['attachment']['type']))
|
{
|
{
|
$update_attachment = true;
| if($_FILES['attachment']['size'] > 0) { $query = $db->simple_select("attachments", "aid", "filename='".$db->escape_string($_FILES['attachment']['name'])."' AND {$attachwhere}"); $updateattach = $db->fetch_field($query, "aid");
require_once MYBB_ROOT."inc/functions_upload.php";
$update_attachment = false; if($updateattach > 0 && $mybb->get_input('updateattachment')) { $update_attachment = true; } $attachedfile = upload_attachment($_FILES['attachment'], $update_attachment); } else { $errors[] = $lang->error_uploadempty; $mybb->input['action'] = "newreply"; }
|
}
|
}
|
$attachedfile = upload_attachment($_FILES['attachment'], $update_attachment);
| |
}
if(!empty($attachedfile['error']))
| }
if(!empty($attachedfile['error']))
|