Changeset 2251

Show
Ignore:
Timestamp:
05/06/08 23:42:45 (23 months ago)
Author:
bchoate
Message:

Fix for counting items published in rebuild loop. BugId:79558

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-38/lib/MT/CMS/Blog.pm

    r2210 r2251  
    661661        my $count = 0; 
    662662        my $cb    = sub { 
    663             $count++; 
    664             return time - $start > 20 ? 0 : 1; 
     663            my $result = time - $start > 20 ? 0 : 1; 
     664            $count++ if $result; 
     665            return $result; 
    665666        }; 
    666667        if ( $offset < $total ) { 
     
    701702                my $count = 0; 
    702703                my $cb    = sub { 
    703                     $count++; 
    704                     return time - $start > 20 ? 0 : 1; 
     704                    my $result = time - $start > 20 ? 0 : 1; 
     705                    $count++ if $result; 
     706                    return $result; 
    705707                }; 
    706708                $app->rebuild(