X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FTransactions.pm;h=6794e527fac9d09621a514e52beedf3631cb2deb;hp=9c359c07f294f2fbc4293ffc3cf8ccf6671309e2;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hpb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e diff --git a/rt/lib/RT/Transactions.pm b/rt/lib/RT/Transactions.pm index 9c359c07f..6794e527f 100755 --- a/rt/lib/RT/Transactions.pm +++ b/rt/lib/RT/Transactions.pm @@ -69,11 +69,10 @@ package RT::Transactions; use strict; use warnings; +use base 'RT::SearchBuilder'; use RT::Transaction; -use base 'RT::SearchBuilder'; - sub Table { 'Transactions'} # {{{ sub _Init @@ -85,9 +84,9 @@ sub _Init { # By default, order by the date of the transaction, rather than ID. $self->OrderByCols( { FIELD => 'Created', - ORDER => 'ASC' }, - { FIELD => 'id', - ORDER => 'ASC' } ); + ORDER => 'ASC' }, + { FIELD => 'id', + ORDER => 'ASC' } ); return ( $self->SUPER::_Init(@_)); } @@ -109,11 +108,10 @@ sub LimitToTicket { my $tid = shift; unless ( $self->{'tickets_table'} ) { - $self->{'tickets_table'} ||= $self->NewAlias('Tickets'); - $self->Join( + $self->{'tickets_table'} ||= $self->Join( ALIAS1 => 'main', FIELD1 => 'ObjectId', - ALIAS2 => $self->{'tickets_table'}, + TABLE2 => 'Tickets', FIELD2 => 'id' ); $self->Limit( @@ -140,20 +138,6 @@ sub AddRecord { return $self->SUPER::AddRecord($record); } - - - - -=head2 NewItem - -Returns an empty new RT::Transaction item - -=cut - -sub NewItem { - my $self = shift; - return(RT::Transaction->new($self->CurrentUser)); -} RT::Base->_ImportOverlays(); 1;