X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FScripConditions.pm;h=8bc4e625a0f31f37fd86aede130dba24ddc8dde9;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=145d94d6b6e65e28787ca83b7c7db09624549ffd;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/lib/RT/ScripConditions.pm b/rt/lib/RT/ScripConditions.pm index 145d94d6b..8bc4e625a 100755 --- a/rt/lib/RT/ScripConditions.pm +++ b/rt/lib/RT/ScripConditions.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -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;