
I'm glad to see it finally works.
Edit: Wow, great timing. :lick:
To fix the editing error:
Replace
if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
updatethreadcount($threadinfo[threadid]);
}
With
if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";
$att = explode(",",$postinfo[attachmentid]);
foreach($att as $value) {
if(isset($qry)) {
$qry .= " OR attachmentid='$value'";
} else {
$qry = "attachmentid='$value'";
}
}
$DB_site->query("DELETE FROM attachment WHERE $qry");
updatethreadcount($threadinfo[threadid]);
}