Current time: 03-19-2010, 12:45 PM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Delete unapproved posts
08-23-2008, 12:38 PM
Post: #1
[F] Delete unapproved posts
If you delete an unapproved post the thread and forum counters don't get updated properly. The number in brackets that shows the number of unapproved posts doesn't change.

Fix: Open inc/class_moderation.php and search for:
PHP Code:
        // Update stats
        
$update_array = array(
            
"replies" => "-{$num_approved_posts}",
            
"unapprovedposts" => "-{$num_unapproved_posts}"
        
);
        
update_thread_counters($post['tid'], $update_array);


        
// Update stats
        
$update_array = array(
            
"posts" => "-{$num_approved_posts}",
            
"unapprovedposts" => "-{$num_unapproved_posts}"
        
); 
Replace with:
PHP Code:
        // Update stats
        
$update_array = array(
            
"replies" => "-{$num_approved_posts}",
            
"unapprovedposts" => $num_unapproved_posts
        
);
        
update_thread_counters($post['tid'], $update_array);


        
// Update stats
        
$update_array = array(
            
"posts" => "-{$num_approved_posts}",
            
"unapprovedposts" => $num_unapproved_posts
        
); 

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
08-23-2008, 09:01 PM
Post: #2
RE: Delete unapproved posts
I could be wrong, but I think this is the actual fix:

Find:
PHP Code:
--$num_unaproved_posts
Replace with:
PHP Code:
++$num_unapproved_posts

(Corrects misspelling, and makes it a positive number because a minus sign is prepended later)
Visit this user's website Find all posts by this user
08-24-2008, 12:04 AM
Post: #3
RE: Delete unapproved posts
Well, the result is the same. Toungue

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
08-26-2008, 04:01 AM
Post: #4
[F] Delete unapproved posts
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user


Forum Jump: