Vergleich inc/functions_upload.php - 1.8.34 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 467Zeile 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 644Zeile 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'])."'");