Index: branches/release-34/lib/MT/App/Trackback.pm
===================================================================
--- branches/release-34/lib/MT/App/Trackback.pm (revision 1823)
+++ branches/release-34/lib/MT/App/Trackback.pm (revision 1866)
@@ -306,5 +306,4 @@
         $ping->source_url($url);
         $ping->ip( $app->remote_ip || '' );
-        $ping->junk_status(0);
         $ping->visible(1);
     }
@@ -594,9 +593,8 @@
         );
     }
-    $arg{not} = { junk_status => 1 };
     my $iter = MT::TBPing->load_iter(
       {
         tb_id       => $tb->id,
-        junk_status => -1,
+        junk_status => MT::TBPing::NOT_JUNK(),
         visible     => 1
       },
Index: branches/release-34/lib/MT/App/CMS.pm
===================================================================
--- branches/release-34/lib/MT/App/CMS.pm (revision 1858)
+++ branches/release-34/lib/MT/App/CMS.pm (revision 1866)
@@ -755,5 +755,5 @@
                         {
                             created_on  => [ $ts, undef ],
-                            junk_status => [ 0,   1 ]
+                            junk_status => MT::Comment::NOT_JUNK(),
                         },
                         { range_incl => { created_on => 1 }, unique => 1 }
@@ -821,5 +821,6 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    require MT::TBPing;
+                    $terms->{junk_status} = MT::TBPing::NOT_JUNK();
                 },
             },
@@ -831,6 +832,7 @@
                     require MT::Entry;
                     my $app = MT->instance;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    require MT::TBPing;
                     require MT::Trackback;
+                    $terms->{junk_status} = MT::TBPing::NOT_JUNK();
                     $args->{join} = MT::Trackback->join_on(
                         undef,
@@ -863,5 +865,6 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    require MT::TBPing;
+                    $terms->{junk_status} = MT::TBPing::NOT_JUNK();
                     $terms->{visible} = 0;
                 },
@@ -872,5 +875,6 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
-                    $terms->{junk_status} = -1;
+                    require MT::TBPing;
+                    $terms->{junk_status} = MT::TBPing::NOT_JUNK();
                 },
             },
@@ -884,5 +888,5 @@
                     $terms->{created_on} = [ $ts, undef ];
                     $args->{range_incl}{created_on} = 1;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    $terms->{junk_status} = MT::TBPing::NOT_JUNK();
                 },
             },
@@ -894,5 +898,6 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    require MT::Comment;
+                    $terms->{junk_status} = MT::Comment::NOT_JUNK();
                 },
             },
@@ -903,6 +908,7 @@
                     my ( $terms, $args ) = @_;
                     require MT::Entry;
+                    require MT::Comment;
                     my $app = MT->instance;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    $terms->{junk_status} = MT::Comment::NOT_JUNK();
                     # This join syntax employs a hack that allows us
                     # to do joins on abitrary columns. Typically,
@@ -932,5 +938,6 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    require MT::Comment;
+                    $terms->{junk_status} = MT::Comment::NOT_JUNK();
                     $terms->{visible} = 0;
                 },
@@ -941,5 +948,6 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
-                    $terms->{junk_status} = -1;
+                    require MT::Comment;
+                    $terms->{junk_status} = MT::Comment::JUNK();
                 },
             },
@@ -952,12 +960,4 @@
                 },
             },
-            #            my_comments => {
-            #                label   => 'My comments',
-            #                order   => 600,
-            #                handler => sub {
-            #                    my ( $terms, $args ) = @_;
-            #                    $terms->{commenter_id} = $app->user->id;
-            #                },
-            #            },
             last_7_days => {
                 label   => 'Comments in the last 7 days',
@@ -965,23 +965,12 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
+                    require MT::Comment;
                     my $ts = time - 7 * 24 * 60 * 60;
                     $ts = epoch2ts( MT->app->blog, $ts );
                     $terms->{created_on} = [ $ts, undef ];
                     $args->{range_incl}{created_on} = 1;
-                    $terms->{junk_status} = [ 0, 1 ];
-                },
-            },
-            #           last_24_hours => {
-            #               label   => 'All comments in the last 24 hours',
-            #               order   => 800,
-            #               handler => sub {
-            #                   my ( $terms, $args ) = @_;
-            #                   my $ts = time - 24 * 60 * 60;
-            #                   $ts = epoch2ts( MT->app->blog, $ts );
-            #                   $terms->{created_on} = [ $ts, undef ];
-            #                   $args->{range_incl}{created_on} = 1;
-            #                   $terms->{junk_status} = [ 0, 1 ];
-            #               },
-            #           },
+                    $terms->{junk_status} = MT::Comment::NOT_JUNK();
+                },
+            },
             _comments_by_user => {
                 label => sub {
@@ -1019,7 +1008,8 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
+                    require MT::Comment;
                     my $entry_id = int( MT->app->param('filter_val') );
                     $terms->{entry_id} = $entry_id;
-                    $terms->{junk_status} = [ 0, 1 ];
+                    $terms->{junk_status} = MT::Comment::NOT_JUNK();
                 },
             },
@@ -1057,4 +1047,5 @@
                 handler => sub {
                     my ( $terms, $args ) = @_;
+                    require MT::Comment;
                     my $val = $app->param('filter_val');
                     my ( $from, $to ) = split /-/, $val;
@@ -1063,5 +1054,5 @@
                     $to = undef unless $to =~ m/^\d{8}$/;
                     $to .= '235959';
-                    $terms->{junk_status} = [ 0, 1 ];
+                    $terms->{junk_status} = MT::Comment::NOT_JUNK();
                     $terms->{created_on} =
                       [ MT::Object::ts2db($from), MT::Object::ts2db($to) ];
@@ -3309,5 +3300,5 @@
         my $tb_count_iter =
           MT::TBPing->count_group_by(
-            { blog_id => $blog_id, junk_status => [ 0, 1 ] },
+            { blog_id => $blog_id, junk_status => MT::TBPing::NOT_JUNK() },
             { group   => ['tb_id'] } );
         while ( my ( $count, $tb_id ) = $tb_count_iter->() ) {
@@ -3390,5 +3381,5 @@
                     {
                         tb_id       => $tb->id,
-                        junk_status => [ 0, 1 ]
+                        junk_status => MT::TBPing::NOT_JUNK(),
                     }
                   );
