]> git.uio.no Git - usit-rt.git/blobdiff - lib/RT/Articles.pm
Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / lib / RT / Articles.pm
index d69eabf824601c31620b95313391b0d0be837d8e..85214328c5f9d3674cc76a9b7f3086e36cf5a9f0 100644 (file)
@@ -314,7 +314,8 @@ sub LimitCustomField {
             $self->Limit( ALIAS => $fields,
                           FIELD => 'Name',
                           VALUE => $args{'FIELD'},
-                          ENTRYAGGREGATOR  => 'OR');
+                          ENTRYAGGREGATOR  => 'OR',
+                          CASESENSITIVE => 0);
             $self->Limit(
                 ALIAS => $fields,
                 FIELD => 'LookupType',
@@ -597,7 +598,11 @@ sub Search {
     require Time::ParseDate;
     foreach my $date (qw(Created< Created> LastUpdated< LastUpdated>)) {
         next unless ( $args{$date} );
-        my $seconds = Time::ParseDate::parsedate( $args{$date}, FUZZY => 1, PREFER_PAST => 1 );
+        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 );
         $dates->{$date} = $date_obj;
@@ -907,22 +912,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;