Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / lib / RT / Search / ActiveTicketsInQueue.pm
index 3291456..7a1f726 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -66,29 +66,23 @@ Find all active tickets in the queue named in the argument passed in
 package RT::Search::ActiveTicketsInQueue;
 
 use strict;
+use warnings;
 use base qw(RT::Search);
 
 
-# {{{ sub Describe 
 sub Describe  {
   my $self = shift;
   return ($self->loc("No description for [_1]", ref $self));
 }
-# }}}
 
-# {{{ sub Prepare
 sub Prepare  {
   my $self = shift;
 
   $self->TicketsObj->LimitQueue(VALUE => $self->Argument);
-
-  foreach my $status (RT::Queue->ActiveStatusArray()) {
-        $self->TicketsObj->LimitStatus(VALUE => $status);
-  }
+  $self->TicketsObj->LimitToActiveStatus;
 
   return(1);
 }
-# }}}
 
 RT::Base->_ImportOverlays();