[open-ils-commits] r15795 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 11 11:07:45 EST 2010
Author: phasefx
Date: 2010-03-11 11:07:42 -0500 (Thu, 11 Mar 2010)
New Revision: 15795
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
Log:
some extra options for the acq user request retrieval methods
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2010-03-11 15:54:03 UTC (rev 15794)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2010-03-11 16:07:42 UTC (rev 15795)
@@ -2166,6 +2166,7 @@
Retrieve fleshed user requests and related data for a given user or users.
@param authtoken Login session key
@param owner Id or array of id's for the pertinent users.
+ @param options Allows one to override the query's 'order_by', 'limit', and 'offset'. And the 'state' of the lineitem in the search.
/
);
@@ -2177,6 +2178,7 @@
Retrieve fleshed user requests and related data for a given org unit or units.
@param authtoken Login session key
@param owner Id or array of id's for the pertinent org units.
+ @param options Allows one to override the query's 'order_by', 'limit', and 'offset'. And the 'state' of the lineitem in the search.
/
);
@@ -2200,6 +2202,15 @@
"order_by"=>[{"class"=>"aur", "field"=>"request_date", "direction"=>"desc"}]
};
+ if ($options && defined $options->{'order_by'}) {
+ $query->{'order_by'} = $options->{'order_by'};
+ }
+ if ($options && defined $options->{'limit'}) {
+ $query->{'limit'} = $options->{'limit'};
+ }
+ if ($options && defined $options->{'offset'}) {
+ $query->{'offset'} = $options->{'offset'};
+ }
if ($options && defined $options->{'state'}) {
$query->{'where'}->{'+jub'}->{'-or'}->[1]->{'state'} = $options->{'state'};
}
More information about the open-ils-commits
mailing list