There is a small bug in the quick moderation module:
PHP Code:
if (can_moderate(0, 'canmoderateattachments'))
{
$attachments = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "attachment WHERE visible = 0");
$attachments['count'] = vb_number_format($attachments['count']);
$show['attachments'] = true;
}
This can show false positives. If you view the moderate.php file in the modcp, you can see how they do it. I have modified it to this:
PHP Code:
if (can_moderate(0, 'canmoderateattachments'))
{
require_once(DIR . '/includes/modfunctions.php');
$sql = fetch_moderator_forum_list_sql('canmoderateattachments');
$attachments = $db->query_first("SELECT COUNT(attachmentid) AS count FROM " . TABLE_PREFIX . "attachment as attachment
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (attachment.postid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (attachment.userid = user.userid)
WHERE $sql AND attachment.visible = 0 AND attachment.postid <> 0");
$attachments['count'] = vb_number_format($attachments['count']);
$show['attachments'] = true;
}