View Full Version : attachment count fixed... good stuff
i'm glad firefly fix it. can you share with us what you did? i'm curious. thanks.
Admin
04-15-2002, 11:39 AM
In editpost.php:
if (trim($attachmentaction)=="new") {
// sort attachement
if (trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") {
$attachmentid=acceptupload($foruminfo[moderateattach]);
$attachmentsql=",attachmentid='$attachmentid'";
$downloadcount = $DB_site->query_first("SELECT counter FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
$DB_site->query("UPDATE attachment SET counter=$downloadcount[counter] WHERE attachmentid=$attachmentid");
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
}
}
It might be easier to do this in another way but I was in a real hurry then.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.