Hi all. There is a small (embarrassing) mistake in the functions.php replacement code. :0 Please correct the following lines in functions.php.
PHP Code:
if (!$allowduplicates) {
if ($result=$DB_site->query_first("SELECT attachmentid
FROM attachment
WHERE hash = '".addslashes($attachmenthash)."'")) {
$attachmentid = $result[attachmentid];
}
} else {
$DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,visible,hash) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($attachment_name)."','".addslashes($filestuff)."','$visible','".addslashes($attachmenthash)."')");
$attachmentid=$DB_site->insert_id();
with
PHP Code:
if (!$allowduplicates) {
if ($result=$DB_site->query_first("SELECT attachmentid
FROM attachment
WHERE hash = '".addslashes($attachmenthash)."'")) {
$attachmentid = $result[attachmentid];
return $attachmentid;
}
}
$DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,visible,hash) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($attachment_name)."','".addslashes($filestuff)."','$visible','".addslashes($attachmenthash)."')");
$attachmentid=$DB_site->insert_id();
We apologize for the inconvenience. The download has also been updated.
Scott