Vergleich inc/functions_upload.php - 1.8.20 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 21Zeile 21
	global $db, $mybb, $plugins;
$aid = (int)$aid;
$posthash = $db->escape_string($posthash);

	global $db, $mybb, $plugins;
$aid = (int)$aid;
$posthash = $db->escape_string($posthash);

	if($posthash != "")

	if(!empty($posthash))

	{
$query = $db->simple_select("attachments", "aid, attachname, thumbnail, visible", "aid='{$aid}' AND posthash='{$posthash}'");
$attachment = $db->fetch_array($query);

	{
$query = $db->simple_select("attachments", "aid, attachname, thumbnail, visible", "aid='{$aid}' AND posthash='{$posthash}'");
$attachment = $db->fetch_array($query);

Zeile 33Zeile 33
	}

$plugins->run_hooks("remove_attachment_do_delete", $attachment);

	}

$plugins->run_hooks("remove_attachment_do_delete", $attachment);

 

if($attachment === false)
{
// no attachment found with the given details
return;
}


$db->delete_query("attachments", "aid='{$attachment['aid']}'");



$db->delete_query("attachments", "aid='{$attachment['aid']}'");


Zeile 427Zeile 433
	else
{
$attachtype = $attachtypes[$ext];

	else
{
$attachtype = $attachtypes[$ext];

 
	}

// check the length of the filename
$maxFileNameLength = 255;
if(my_strlen($attachment['name']) > $maxFileNameLength)
{
$ret['error'] = $lang->sprintf($lang->error_attach_filename_length, htmlspecialchars_uni($attachment['name']), $maxFileNameLength);
return $ret;

	}

// Check the size

	}

// Check the size