Thank's for catching that! A simple typo. My copy doesn't have it and it's from the same archive. Odd... Must have snuck in there somehow! I've highlighted in this snippet of offending code:
Code:
$attachments = $DB_site->query_first("
SELECT COUNT(*) AS total,
SUM(filesize) AS sum
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
WHERE attachment.userid = $userid
AND ((forumid IN(0$forumids) AND thread.visible = 1 AND post.visible = 1 AND deletionlog.primaryid IS NULL) " . iif($userid==$bbuserinfo['userid'], "OR attachment.postid = 0") . ")
");