X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FScripConditions.pm;h=dc97a1636dcca4679a2259cbbce2a9c525501ca7;hp=9555e22f05a924cc64c7e3dca556ba4b94a5a3a6;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hpb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e diff --git a/rt/lib/RT/ScripConditions.pm b/rt/lib/RT/ScripConditions.pm index 9555e22f0..dc97a1636 100755 --- a/rt/lib/RT/ScripConditions.pm +++ b/rt/lib/RT/ScripConditions.pm @@ -70,41 +70,29 @@ package RT::ScripConditions; use strict; use warnings; +use base 'RT::SearchBuilder'; use RT::ScripCondition; -use base 'RT::SearchBuilder'; - sub Table { 'ScripConditions'} sub LimitToType { my $self = shift; my $type = shift; $self->Limit (ENTRYAGGREGATOR => 'OR', - FIELD => 'Type', - VALUE => "$type") + FIELD => 'Type', + VALUE => "$type") if defined $type; $self->Limit (ENTRYAGGREGATOR => 'OR', - FIELD => 'Type', - VALUE => "Correspond") + FIELD => 'Type', + VALUE => "Correspond") if $type eq "Create"; $self->Limit (ENTRYAGGREGATOR => 'OR', - FIELD => 'Type', - VALUE => 'any'); - -} - + FIELD => 'Type', + VALUE => 'any'); -=head2 NewItem - -Returns an empty new RT::ScripCondition item - -=cut - -sub NewItem { - my $self = shift; - return(RT::ScripCondition->new($self->CurrentUser)); } + RT::Base->_ImportOverlays(); 1;