vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > Add-On Modules & Modifications > vBa CMPS v3.x & 2.x > Add-On Modules (version 3.x & 2.x)

Reply
 
Thread Tools Display Modes
  #1  
Old 11-21-2012, 04:06 PM
Andy R's Avatar
Andy R Andy R is offline
Member
 
Join Date: Mar 2004
Location: Traveling...
Posts: 56
Default moderate.php

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;

__________________
Social Knowledge Networks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
moderate link is gone tattooz Troubleshooting & Problems 6 09-03-2010 10:22 AM
WYSIWYG for moderate.php chabbs Feedback & Suggestions 0 09-29-2009 02:39 PM
waiting for moderate module always shows 1.and inside is nothing to moderate avitor Troubleshooting & Problems 1 06-02-2008 12:53 PM
Quick Moderate BlackNova "How Do I..." Questions 1 07-01-2005 07:55 PM


All times are GMT -4. The time now is 03:50 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.