[rt-commit] [svn] r654 - rt/branches/rt-3.3/lib/RT

jesse at fsck.com jesse at fsck.com
Thu Apr 1 16:52:32 EST 2004


Author: jesse
Date: Thu Apr  1 16:52:31 2004
New Revision: 654

Modified:
   rt/branches/rt-3.3/lib/RT/Transactions_Overlay.pm
Log:
Added support for RT 3.0 compatible Transactions->Limit

Modified: rt/branches/rt-3.3/lib/RT/Transactions_Overlay.pm
==============================================================================
--- rt/branches/rt-3.3/lib/RT/Transactions_Overlay.pm	(original)
+++ rt/branches/rt-3.3/lib/RT/Transactions_Overlay.pm	Thu Apr  1 16:52:31 2004
@@ -62,6 +62,30 @@
 }
 # }}}
 
+=head2 Limit
+
+A wrapper around SUPER::Limit to catch migration issues
+
+=cut
+
+sub Limit {
+	my $self = shift;
+	my %args = (@_);
+
+	if ($args{'FIELD'} eq 'Ticket') {
+		Carp::cluck("Historical code calling RT::Transactions::Limit with a 'Ticket'.  This deprecated API will be deleted in 3.6");
+		$self->SUPER::Limit(FIELD => 'ObjectType', OPERATOR => '=', VALUE =>'RT::Ticket');
+		$args{'FIELD'} = 'ObjectId';
+		$self->SUPER::Limit(%args);
+
+	} else {
+
+		$self->SUPER::Limit(%args);
+	}
+
+
+}
+
 =head2 example methods
 
   Queue RT::Queue or Queue Id



More information about the Rt-commit mailing list