diff options
author | ivan <ivan> | 2008-03-02 04:11:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-02 04:11:51 +0000 |
commit | 8103c1fc1b2c27a6855feadf26f91b980a54bc52 (patch) | |
tree | 631dd45606c37c00d9026e14ecc3ee3700b4b51c /rt/lib/RT/Search | |
parent | 9c68254528b6f2c7d8c1921b452fa56064783782 (diff) |
import rt 3.6.6
Diffstat (limited to 'rt/lib/RT/Search')
-rw-r--r-- | rt/lib/RT/Search/ActiveTicketsInQueue.pm | 7 | ||||
-rw-r--r-- | rt/lib/RT/Search/FromSQL.pm | 7 | ||||
-rw-r--r-- | rt/lib/RT/Search/Generic.pm | 7 | ||||
-rw-r--r-- | rt/lib/RT/Search/Googleish.pm | 17 |
4 files changed, 29 insertions, 9 deletions
diff --git a/rt/lib/RT/Search/ActiveTicketsInQueue.pm b/rt/lib/RT/Search/ActiveTicketsInQueue.pm index 9f9dac70f..d75cd1f2c 100644 --- a/rt/lib/RT/Search/ActiveTicketsInQueue.pm +++ b/rt/lib/RT/Search/ActiveTicketsInQueue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/copyleft/gpl.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,6 @@ # those contributions and any derivatives thereof. # # END BPS TAGGED BLOCK }}} - =head1 NAME RT::Search::ActiveTicketsInQueue diff --git a/rt/lib/RT/Search/FromSQL.pm b/rt/lib/RT/Search/FromSQL.pm index 3842bb6ae..e3a126416 100644 --- a/rt/lib/RT/Search/FromSQL.pm +++ b/rt/lib/RT/Search/FromSQL.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/copyleft/gpl.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,6 @@ # those contributions and any derivatives thereof. # # END BPS TAGGED BLOCK }}} - =head1 NAME RT::Search::FromSQL diff --git a/rt/lib/RT/Search/Generic.pm b/rt/lib/RT/Search/Generic.pm index 3f3aa837b..15e5e9630 100644 --- a/rt/lib/RT/Search/Generic.pm +++ b/rt/lib/RT/Search/Generic.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/copyleft/gpl.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,6 @@ # those contributions and any derivatives thereof. # # END BPS TAGGED BLOCK }}} - =head1 NAME RT::Search::Generic - ; diff --git a/rt/lib/RT/Search/Googleish.pm b/rt/lib/RT/Search/Googleish.pm index a7a1d3e77..a2a887377 100644 --- a/rt/lib/RT/Search/Googleish.pm +++ b/rt/lib/RT/Search/Googleish.pm @@ -74,6 +74,16 @@ use strict; use base qw(RT::Search::Generic); +# sub _Init {{{ +sub _Init { + my $self = shift; + my %args = @_; + + $self->{'Queues'} = delete($args{'Queues'}) || []; + $self->SUPER::_Init(%args); +} +# }}} + # {{{ sub Describe sub Describe { my $self = shift; @@ -141,6 +151,13 @@ sub QueryToSQL { } } + # restrict to any queues requested by the caller + for my $queue (@{ $self->{'Queues'} }) { + my $QueueObj = RT::Queue->new($self->TicketsObj->CurrentUser); + $QueueObj->Load($queue) or next; + push @queue_clauses, "Queue = '" . $QueueObj->Name . "'"; + } + push @tql_clauses, join( " OR ", sort @id_clauses ); push @tql_clauses, join( " OR ", sort @owner_clauses ); push @tql_clauses, join( " OR ", sort @status_clauses ); |