Vergleich newthread.php - 1.8.0 - 1.8.2

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

// 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(!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'] = "newthread";
}

		}

		}

		$attachedfile = upload_attachment($_FILES['attachment'], $update_attachment);

 
	}

// Error with attachments - should use new inline errors?

	}

// Error with attachments - should use new inline errors?