added support for optional limit, offset, and order_by filters to open-ils.trigger...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 11 Nov 2009 15:40:09 +0000 (15:40 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 11 Nov 2009 15:40:09 +0000 (15:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14866 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm

index 702d7ff..99c7f38 100644 (file)
@@ -247,6 +247,10 @@ sub events_by_target {
         order_by => { "atev" => [ 'run_time', 'add_time' ] }
     };
 
+    $query->{limit} = $filter->{limit} if defined $filter->{limit};
+    $query->{offset} = $filter->{offset} if defined $filter->{offset};
+    $query->{order_by} = $filter->{order_by} if defined $filter->{order_by};
+
 
     # allow multiple 'target' filters
     $query->{where}->{'+atev'}->{'-and'} = [];