Show
Ignore:
Timestamp:
04/11/08 19:19:30 (20 months ago)
Author:
bchoate
Message:

Changes to store binary state to junk_status column. BugId:79280

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-34/lib/MT/CMS/Comment.pm

    r1823 r1866  
    273273        if ( $filter_col eq 'status' ) { 
    274274            if ( $val eq 'approved' ) { 
    275                 $terms{junk_status} = 1; 
     275                $terms{visible} = 1; 
    276276            } 
    277277            elsif ( $val eq 'pending' ) { 
    278                 $terms{junk_status} = 0; 
     278                $terms{visible} = 0; 
    279279            } 
    280280            elsif ( $val eq 'junk' ) { 
    281                 $terms{junk_status} = -1; 
     281                $terms{junk_status} = MT::Comment::JUNK(); 
    282282            } 
    283283            else { 
    284                 $terms{junk_status} = [ 0, 1 ]; 
     284                $terms{junk_status} = MT::Comment::NOT_JUNK(); 
    285285            } 
    286286        } 
     
    934934    my $class = $app->model($type); 
    935935    my $arg   = {}; 
    936     $arg->{junk_status} = -1; 
     936    require MT::Comment; 
     937    $arg->{junk_status} = MT::Comment::JUNK(); 
    937938    $arg->{blog_id} = $blog_id if $blog_id; 
    938939    $class->remove($arg); 
     
    14461447    elsif ( $status eq 'moderate' ) { 
    14471448        $obj->moderate; 
    1448         $obj->junk_status(0); 
    14491449    } 
    14501450    elsif ( $status eq 'junk' ) {