diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:32:26 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:32:26 -0700 |
commit | 026dc7ad72ba972f230b6709e31fa64397d75ad4 (patch) | |
tree | c5af1a7ac9154744afc3660e9a9405892f2bb50b /rt/lib/RT/Articles.pm | |
parent | 07b4bc84d1078f7390221d766cdb3142513db4b0 (diff) | |
parent | 1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (diff) |
merge RT 4.2.11 and Header changes to disable RT javascript, RT#34237
Diffstat (limited to 'rt/lib/RT/Articles.pm')
-rw-r--r-- | rt/lib/RT/Articles.pm | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/rt/lib/RT/Articles.pm b/rt/lib/RT/Articles.pm index 680023296..4b85ebab6 100644 --- a/rt/lib/RT/Articles.pm +++ b/rt/lib/RT/Articles.pm @@ -300,7 +300,8 @@ sub LimitCustomField { $self->Limit( ALIAS => $fields, FIELD => 'Name', VALUE => $args{'FIELD'}, - ENTRYAGGREGATOR => 'OR'); + ENTRYAGGREGATOR => 'OR', + CASESENSITIVE => 0); $self->Limit( ALIAS => $fields, FIELD => 'LookupType', @@ -388,15 +389,15 @@ sub LimitCustomField { sub LimitTopics { my $self = shift; my @topics = @_; + return unless @topics; my $topics = $self->NewAlias('ObjectTopics'); $self->Limit( - ALIAS => $topics, - FIELD => 'Topic', - VALUE => $_, - ENTRYAGGREGATOR => 'OR' - ) - for @topics; + ALIAS => $topics, + FIELD => 'Topic', + OPERATOR => 'IN', + VALUE => [ @topics ], + ); $self->Limit( ALIAS => $topics, @@ -580,16 +581,10 @@ sub Search { } - require Time::ParseDate; foreach my $date (qw(Created< Created> LastUpdated< LastUpdated>)) { next unless ( $args{$date} ); - my ($seconds, $error) = Time::ParseDate::parsedate( $args{$date}, FUZZY => 1, PREFER_PAST => 1 ); - unless ( defined $seconds ) { - $RT::Logger->warning( - "Couldn't parse date '$args{$date}' by Time::ParseDate" ); - } my $date_obj = RT::Date->new( $self->CurrentUser ); - $date_obj->Set( Format => 'unix', Value => $seconds ); + $date_obj->Set( Format => 'unknown', Value => $args{$date} ); $dates->{$date} = $date_obj; if ( $date =~ /^(.*?)<$/i ) { @@ -897,22 +892,6 @@ sub Search { return 1; } - -=head2 NewItem - -Returns an empty new RT::Article item - -=cut - -sub NewItem { - my $self = shift; - return(RT::Article->new($self->CurrentUser)); -} - - - RT::Base->_ImportOverlays(); 1; - -1; |