enhancement C4::Members.pm Improving POD
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 5 Nov 2009 14:58:38 +0000 (15:58 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 6 Nov 2009 11:33:15 +0000 (12:33 +0100)
Adding a function to output field as xml

C4/Members.pm

index da1bf37..bed69ab 100644 (file)
@@ -244,6 +244,41 @@ sub SearchMember {
     return ( scalar(@$data), $data );
 }
 
+=over 2
+
+=item Search
+
+  $borrowers_result_array_ref = &Search($filter,$orderby, $limit, $columns_out, $search_on_fields,$searchtype);
+
+=back
+
+Looks up patrons (borrowers) on filter.
+
+BUGFIX 499: C<$type> is now used to determine type of search.
+if $type is "simple", search is performed on the first letter of the
+surname only.
+
+$category_type is used to get a specified type of user. 
+(mainly adults when creating a child.)
+
+C<$filter> can be
+   - a space-separated list of search terms. Implicit AND is done on them
+   - a hash ref containing fieldnames associated with queried value
+   - an array ref combining the two previous elements Implicit OR is done between each array element
+
+
+C<$orderby> is an arrayref of hashref. Contains the name of the field and 0 or 1 depending if order is ascending or descending
+
+C<$limit> is there to allow limiting number of results returned
+
+C<&columns_out> is an array ref to the fieldnames you want to see in the result list
+
+C<&search_on_fields> is an array ref to the fieldnames you want to limit search on when you are using string search
+
+C<&searchtype> is a string telling the type of search you want todo : start_with, exact or contains are allowed
+
+=cut
+
 sub Search {
     my ($filter,$orderby, $limit, $columns_out, $search_on_fields,$searchtype) = @_;
        my @filters;