various methods to split subjects (depending on OS)
[koha.git] / C4 / SearchMarc.pm
1 package C4::SearchMarc;
2
3 # Copyright 2000-2002 Katipo Communications
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
10 # version.
11 #
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License along with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA  02111-1307 USA
19
20 use strict;
21 require Exporter;
22 use DBI;
23 use C4::Context;
24 use C4::Biblio;
25 use C4::Date;
26 use Date::Manip;
27
28 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
29
30 # set the version for version checking
31 $VERSION = 0.02;
32
33 =head1 NAME
34
35 C4::Search - Functions for searching the Koha MARC catalog
36
37 =head1 FUNCTIONS
38
39 This module provides the searching facilities for the Koha MARC catalog
40
41 =cut
42
43 @ISA = qw(Exporter);
44 @EXPORT = qw(&catalogsearch &findseealso &findsuggestion &getMARCnotes &getMARCsubjects);
45
46 =head1 findsuggestion($dbh,$values);
47
48 =head2 $dbh is a link to the DB handler.
49
50 use C4::Context;
51 my $dbh =C4::Context->dbh;
52
53 =head2 $values is a word
54
55 Searches words with the same soundex, ordered by frequency of use.
56 Useful to suggest other searches to the users.
57
58 =cut
59
60 sub findsuggestion {
61         my ($dbh,$values) = @_;
62         my $sth = $dbh->prepare("SELECT count( * ) AS total, word FROM marc_word WHERE sndx_word = soundex( ? ) AND word <> ? GROUP BY word ORDER BY total DESC");
63         my @results;
64         for(my $i = 0 ; $i <= $#{$values} ; $i++) {
65                 if (length(@$values[$i]) >=5) {
66                         $sth->execute(@$values[$i],@$values[$i]);
67                         my $resfound = 1;
68                         my @resline;
69                         while ((my ($count,$word) = $sth->fetchrow) and $resfound <=10) {
70                                 push @results, "@$values[$i]|$word|$count";
71 #                               $results{@$values[$i]} = \@resline;
72                                 $resfound++;
73                         }
74                 }
75         }
76         return \@results;
77 }
78
79 =head1 findseealso($dbh,$fields);
80
81 =head2 $dbh is a link to the DB handler.
82
83 use C4::Context;
84 my $dbh =C4::Context->dbh;
85
86 =head2 $fields is a reference to the fields array
87
88 This function modify the @$fields array and add related fields to search on.
89
90 =cut
91
92 sub findseealso {
93         my ($dbh, $fields) = @_;
94         my $tagslib = MARCgettagslib ($dbh,1);
95         for (my $i=0;$i<=$#{$fields};$i++) {
96                 my ($tag) =substr(@$fields[$i],1,3);
97                 my ($subfield) =substr(@$fields[$i],4,1);
98                 @$fields[$i].=','.$tagslib->{$tag}->{$subfield}->{seealso} if ($tagslib->{$tag}->{$subfield}->{seealso});
99         }
100 }
101
102 =head1  my ($count, @results) = catalogsearch($dbh, $tags, $and_or, $excluding, $operator, $value, $offset,$length,$orderby);
103
104 =head2 $dbh is a link to the DB handler.
105
106 use C4::Context;
107 my $dbh =C4::Context->dbh;
108
109 $tags,$and_or, $excluding, $operator, $value are references to array
110
111 =head2 $tags
112
113 contains the list of tags+subfields (for example : $@tags[0] = '200a')
114 A field can be a list of fields : '200f','700a','700b','701a','701b'
115
116 Example
117
118 =head2 $and_or
119
120 contains  a list of strings containing and or or. The 1st value is useless.
121
122 =head2 $excluding
123
124 contains 0 or 1. If 1, then the request is negated.
125
126 =head2 $operator
127
128 contains contains,=,start,>,>=,<,<= the = and start work on the complete subfield. The contains operator works on every word in the subfield.
129
130 examples :
131 contains home, search home anywhere.
132 = home, search a string being home.
133
134 =head2 $value
135
136 contains the value to search
137 If it contains a * or a %, then the search is partial.
138
139 =head2 $offset and $length
140
141 returns $length results, beginning at $offset
142
143 =head2 $orderby
144
145 define the field used to order the request. Any field in the biblio/biblioitem tables can be used. DESC is possible too
146
147 (for example title, title DESC,...)
148
149 =head2 RETURNS
150
151 returns an array containing hashes. The hash contains all biblio & biblioitems fields and a reference to an item hash. The "item hash contains one line for each callnumber & the number of items related to the callnumber.
152
153 =cut
154
155 =head2 my $marcnotesarray = &getMARCnotes($dbh,$bibid,$marcflavour);
156
157 Returns a reference to an array containing all the notes stored in the MARC database for the given bibid.
158 $marcflavour ("MARC21" or "UNIMARC") determines which tags are used for retrieving subjects.
159
160 =head2 my $marcsubjctsarray = &getMARCsubjects($dbh,$bibid,$marcflavour);
161
162 Returns a reference to an array containing all the subjects stored in the MARC database for the given bibid.
163 $marcflavour ("MARC21" or "UNIMARC") determines which tags are used for retrieving subjects.
164
165 =cut
166
167 sub catalogsearch {
168         my ($dbh, $tags, $and_or, $excluding, $operator, $value, $offset,$length,$orderby) = @_;
169         # build the sql request. She will look like :
170         # select m1.bibid
171         #               from marc_subfield_table as m1, marc_subfield_table as m2
172         #               where m1.bibid=m2.bibid and
173         #               (m1.subfieldvalue like "Des%" and m2.subfieldvalue like "27%")
174
175         # last minute stripping out of stuff
176         # doesn't work @$value =~ s/\'/ /;
177         # @$value = map { $_ =~ s/\'/ /g } @$value;
178         
179         # "Normal" statements
180         my @normal_tags = ();
181         my @normal_and_or = ();
182         my @normal_operator = ();
183         my @normal_value = ();
184         # Extracts the NOT statements from the list of statements
185         my @not_tags = ();
186         my @not_and_or = ();
187         my @not_operator = ();
188         my @not_value = ();
189         my $any_not = 0;
190         $orderby = "biblio.title" unless $orderby;
191         
192         #last minute stripping out of ' and ,
193         foreach $_ (@$value) {
194         $_=~ s/\'/ /g;
195         $_=~ s/\,/ /g;
196         }
197         
198         for(my $i = 0 ; $i <= $#{$value} ; $i++)
199         {
200                 # replace * by %
201                 @$value[$i] =~ s/\*/%/g;
202                 # remove % at the beginning
203                 @$value[$i] =~ s/^%//g;
204             @$value[$i] =~ s/(\.|\?|\:|\!|\'|,|\-|\"|\(|\)|\[|\]|\{|\})/ /g;
205                 if(@$excluding[$i])     # NOT statements
206                 {
207                         $any_not = 1;
208                         if(@$operator[$i] eq "contains")
209                         {
210                                 foreach my $word (split(/ /, @$value[$i]))      # if operator is contains, splits the words in separate requests
211                                 {
212                                         # remove the "%" for small word (3 letters. (note : the >4 is due to the % at the end)
213 #                                       warn "word : $word";
214                                         $word =~ s/%//g unless length($word)>4;
215                                         unless (C4::Context->stopwords->{uc($word)} or length($word)==1) {      #it's NOT a stopword => use it. Otherwise, ignore
216                                                 push @not_tags, @$tags[$i];
217                                                 push @not_and_or, "or"; # as request is negated, finds "foo" or "bar" if final request is NOT "foo" and "bar"
218                                                 push @not_operator, @$operator[$i];
219                                                 push @not_value, $word;
220                                         }
221                                 }
222                         }
223                         else
224                         {
225                                 push @not_tags, @$tags[$i];
226                                 push @not_and_or, "or"; # as request is negated, finds "foo" or "bar" if final request is NOT "foo" and "bar"
227                                 push @not_operator, @$operator[$i];
228                                 push @not_value, @$value[$i];
229                         }
230                 }
231                 else    # NORMAL statements
232                 {
233                         if(@$operator[$i] eq "contains") # if operator is contains, splits the words in separate requests
234                         {
235                                 foreach my $word (split(/ /, @$value[$i]))
236                                 {
237                                         # remove the "%" for small word (3 letters. (note : the >4 is due to the % at the end)
238 #                                       warn "word : $word";
239                                         $word =~ s/%//g unless length($word)>4;
240                                         unless (C4::Context->stopwords->{uc($word)} or length($word)==1) {      #it's NOT a stopword => use it. Otherwise, ignore
241                                                 my $tag = substr(@$tags[$i],0,3);
242                                                 my $subf = substr(@$tags[$i],3,1);
243                                                 push @normal_tags, @$tags[$i];
244                                                 push @normal_and_or, "and";     # assumes "foo" and "bar" if "foo bar" is entered
245                                                 push @normal_operator, @$operator[$i];
246                                                 push @normal_value, $word;
247                                         }
248                                 }
249                         }
250                         else
251                         {
252                                 push @normal_tags, @$tags[$i];
253                                 push @normal_and_or, @$and_or[$i];
254                                 push @normal_operator, @$operator[$i];
255                                 push @normal_value, @$value[$i];
256                         }
257                 }
258         }
259
260         # Finds the basic results without the NOT requests
261         my ($sql_tables, $sql_where1, $sql_where2) = create_request($dbh,\@normal_tags, \@normal_and_or, \@normal_operator, \@normal_value);
262
263         $sql_where1 .= "and TO_DAYS( NOW( ) ) - TO_DAYS( biblio.timestamp ) <30" if $orderby =~ "biblio.timestamp";
264         my $sth;
265         if ($sql_where2) {
266                 $sth = $dbh->prepare("select distinct m1.bibid from biblio,biblioitems,marc_biblio,$sql_tables where biblio.biblionumber=marc_biblio.biblionumber and biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and $sql_where2 and ($sql_where1) order by $orderby");
267                 warn "Q2 : select distinct m1.bibid from biblio,biblioitems,marc_biblio,$sql_tables where biblio.biblionumber=marc_biblio.biblionumber and biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and $sql_where2 and ($sql_where1) order by $orderby term is  @$value";
268         } else {
269                 $sth = $dbh->prepare("select distinct m1.bibid from biblio,biblioitems,marc_biblio,$sql_tables where biblio.biblionumber=marc_biblio.biblionumber and biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and $sql_where1 order by $orderby");
270                 warn "Q : select distinct m1.bibid from biblio,biblioitems,marc_biblio,$sql_tables where biblio.biblionumber=marc_biblio.biblionumber and biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and $sql_where1 order by $orderby";
271         }
272         $sth->execute();
273         my @result = ();
274
275         # Processes the NOT if any and there are results
276         my ($not_sql_tables, $not_sql_where1, $not_sql_where2);
277
278         if( ($sth->rows) && $any_not )  # some results to tune up and some NOT statements
279         {
280                 ($not_sql_tables, $not_sql_where1, $not_sql_where2) = create_request($dbh,\@not_tags, \@not_and_or, \@not_operator, \@not_value);
281
282                 my @tmpresult;
283
284                 while (my ($bibid) = $sth->fetchrow) {
285                         push @tmpresult,$bibid;
286                 }
287                 my $sth_not;
288                 warn "NOT : select distinct m1.bibid from $not_sql_tables where $not_sql_where2 and ($not_sql_where1)";
289                 if ($not_sql_where2) {
290                         $sth_not = $dbh->prepare("select distinct m1.bibid from $not_sql_tables where $not_sql_where2 and ($not_sql_where1)");
291                 } else {
292                         $sth_not = $dbh->prepare("select distinct m1.bibid from $not_sql_tables where $not_sql_where1");
293                 }
294                 $sth_not->execute();
295
296                 if($sth_not->rows)
297                 {
298                         my %not_bibids = ();
299                         while(my $bibid = $sth_not->fetchrow()) {
300                                 $not_bibids{$bibid} = 1;        # populates the hashtable with the bibids matching the NOT statement
301                         }
302
303                         foreach my $bibid (@tmpresult)
304                         {
305                                 if(!$not_bibids{$bibid})
306                                 {
307                                         push @result, $bibid;
308                                 }
309                         }
310                 }
311                 $sth_not->finish();
312         }
313         else    # no NOT statements
314         {
315                 while (my ($bibid) = $sth->fetchrow) {
316                         push @result,$bibid;
317                 }
318         }
319
320         # we have bibid list. Now, loads title and author from [offset] to [offset]+[length]
321         my $counter = $offset;
322         # HINT : biblionumber as bn is important. The hash is fills biblionumber with items.biblionumber.
323         # so if you dont' has an item, you get a not nice empty value.
324         $sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblio.*, biblioitems.*,marc_biblio.bibid,itemtypes.notforloan
325                                                         FROM biblio, marc_biblio 
326                                                         LEFT JOIN biblioitems on biblio.biblionumber = biblioitems.biblionumber
327                                                         LEFT JOIN itemtypes on itemtypes.itemtype=biblioitems.itemtype
328                                                         WHERE biblio.biblionumber = marc_biblio.biblionumber AND bibid = ?");
329         my @finalresult = ();
330         my @CNresults=();
331         my $totalitems=0;
332         my $oldline;
333         my ($oldbibid, $oldauthor, $oldtitle);
334         my $sth_itemCN = $dbh->prepare("select items.* from items where biblionumber=?");
335         my $sth_issue = $dbh->prepare("select date_due,returndate from issues where itemnumber=?");
336         # parse all biblios between start & end.
337         while (($counter <= $#result) && ($counter <= ($offset + $length))) {
338                 # search & parse all items & note itemcallnumber
339                 $sth->execute($result[$counter]);
340                 my $continue=1;
341                 my $line = $sth->fetchrow_hashref;
342                 my $biblionumber=$line->{bn};
343 #               $continue=0 unless $line->{bn};
344 #               my $lastitemnumber;
345                 $sth_itemCN->execute($biblionumber);
346                 my @CNresults = ();
347                 my $notforloan=1; # to see if there is at least 1 item that can be issued
348                 while (my $item = $sth_itemCN->fetchrow_hashref) {
349                         # parse the result, putting holdingbranch & itemcallnumber in separate array
350                         # then all other fields in the main array
351                         
352                         # search if item is on loan
353                         my $date_due;
354                         $sth_issue->execute($item->{itemnumber});
355                         while (my $loan = $sth_issue->fetchrow_hashref) {
356                                 if ($loan->{date_due} and !$loan->{returndate}) {
357                                         $date_due = $loan->{date_due};
358                                 }
359                         }
360                         # store this item
361                         my %lineCN;
362                         $lineCN{holdingbranch} = $item->{holdingbranch};
363                         $lineCN{itemcallnumber} = $item->{itemcallnumber};
364                         $lineCN{location} = $item->{location};
365                         $lineCN{date_due} = format_date($date_due);
366                         $notforloan=0 unless ($item->{notforloan} or $item->{wthdrawn} or $item->{itemlost});
367                         push @CNresults,\%lineCN;
368                         $totalitems++;
369                 }
370                 # save the biblio in the final array, with item and item issue status
371                 my %newline;
372                 %newline = %$line;
373                 $newline{totitem} = $totalitems;
374                 $newline{biblionumber} = $biblionumber;
375                 $newline{norequests} = 0;
376                 $newline{norequests} = 1 if ($line->{notforloan}); # itemtype not issuable
377                 $newline{norequests} = 1 if (!$line->{notforloan} && $notforloan); # itemtype issuable but all items not issuable for instance
378                 my @CNresults2= @CNresults;
379                 $newline{CN} = \@CNresults2;
380                 $newline{'even'} = 1 if $#finalresult % 2 == 0;
381                 $newline{'odd'} = 1 if $#finalresult % 2 == 1;
382                 $newline{'timestamp'} = format_date($newline{timestamp});
383                 @CNresults = ();
384                 push @finalresult, \%newline;
385                 $totalitems=0;
386                 $counter++;
387         }
388         my $nbresults = $#result+1;
389         return (\@finalresult, $nbresults);
390 }
391
392 # Creates the SQL Request
393
394 sub create_request {
395         my ($dbh,$tags, $and_or, $operator, $value) = @_;
396
397         my $sql_tables; # will contain marc_subfield_table as m1,...
398         my $sql_where1; # will contain the "true" where
399         my $sql_where2 = "("; # will contain m1.bibid=m2.bibid
400         my $nb_active=0; # will contain the number of "active" entries. an entry is active if a value is provided.
401         my $nb_table=1; # will contain the number of table. ++ on each entry EXCEPT when an OR  is provided.
402
403         for(my $i=0; $i<=@$value;$i++) {
404                 if (@$value[$i]) {
405                         $nb_active++;
406                         if ($nb_active==1) {
407                                 if (@$operator[$i] eq "start") {
408                                         $sql_tables .= "marc_subfield_table as m$nb_table,";
409                                         $sql_where1 .= "(m1.subfieldvalue like ".$dbh->quote("@$value[$i]%");
410                                         if (@$tags[$i]) {
411                                                 $sql_where1 .=" and concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
412                                         }
413                                         $sql_where1.=")";
414                                 } elsif (@$operator[$i] eq "contains") {
415                                         $sql_tables .= "marc_word as m$nb_table,";
416                                         $sql_where1 .= "(m1.word  like ".$dbh->quote("@$value[$i]");
417                                         if (@$tags[$i]) {
418                                                  $sql_where1 .=" and m1.tagsubfield in (@$tags[$i])";
419                                         }
420                                         $sql_where1.=")";
421                                 } else {
422                                         $sql_tables .= "marc_subfield_table as m$nb_table,";
423                                         $sql_where1 .= "(m1.subfieldvalue @$operator[$i] ".$dbh->quote("@$value[$i]");
424                                         if (@$tags[$i]) {
425                                                  $sql_where1 .=" and concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
426                                         }
427                                         $sql_where1.=")";
428                                 }
429                         } else {
430                                 if (@$operator[$i] eq "start") {
431                                         $nb_table++;
432                                         $sql_tables .= "marc_subfield_table as m$nb_table,";
433                                         $sql_where1 .= "@$and_or[$i] (m$nb_table.subfieldvalue like ".$dbh->quote("@$value[$i]%");
434                                         if (@$tags[$i]) {
435                                                 $sql_where1 .=" and concat(m$nb_table.tag,m$nb_table.subfieldcode) in (@$tags[$i])";
436                                         }
437                                         $sql_where1.=")";
438                                         $sql_where2 .= "m1.bibid=m$nb_table.bibid and ";
439                                 } elsif (@$operator[$i] eq "contains") {
440                                         if (@$and_or[$i] eq 'and') {
441                                                 $nb_table++;
442                                                 $sql_tables .= "marc_word as m$nb_table,";
443                                                 $sql_where1 .= "@$and_or[$i] (m$nb_table.word like ".$dbh->quote("@$value[$i]");
444                                                 if (@$tags[$i]) {
445                                                         $sql_where1 .=" and m$nb_table.tagsubfield in(@$tags[$i])";
446                                                 }
447                                                 $sql_where1.=")";
448                                                 $sql_where2 .= "m1.bibid=m$nb_table.bibid and ";
449                                         } else {
450                                                 $sql_where1 .= "@$and_or[$i] (m$nb_table.word like ".$dbh->quote("@$value[$i]");
451                                                 if (@$tags[$i]) {
452                                                         $sql_where1 .="  and m$nb_table.tagsubfield in (@$tags[$i])";
453                                                 }
454                                                 $sql_where1.=")";
455                                                 $sql_where2 .= "m1.bibid=m$nb_table.bibid and ";
456                                         }
457                                 } else {
458                                         $nb_table++;
459                                         $sql_tables .= "marc_subfield_table as m$nb_table,";
460                                         $sql_where1 .= "@$and_or[$i] (m$nb_table.subfieldvalue @$operator[$i] ".$dbh->quote(@$value[$i]);
461                                         if (@$tags[$i]) {
462                                                 $sql_where1 .="  and concat(m$nb_table.tag,m$nb_table.subfieldcode) in (@$tags[$i])";
463                                         }
464                                         $sql_where2 .= "m1.bibid=m$nb_table.bibid and ";
465                                         $sql_where1.=")";
466                                 }
467                         }
468                 }
469         }
470
471         if($sql_where2 ne "(")  # some datas added to sql_where2, processing
472         {
473                 $sql_where2 = substr($sql_where2, 0, (length($sql_where2)-5)); # deletes the trailing ' and '
474                 $sql_where2 .= ")";
475         }
476         else    # no sql_where2 statement, deleting '('
477         {
478                 $sql_where2 = "";
479         }
480         chop $sql_tables;       # deletes the trailing ','
481         return ($sql_tables, $sql_where1, $sql_where2);
482 }
483
484 sub getMARCnotes {
485         my ($dbh, $bibid, $marcflavour) = @_;
486         my ($mintag, $maxtag);
487         if ($marcflavour eq "MARC21") {
488                 $mintag = "500";
489                 $maxtag = "599";
490         } else {           # assume unimarc if not marc21
491                 $mintag = "300";
492                 $maxtag = "399";
493         }
494
495         my $sth=$dbh->prepare("SELECT subfieldvalue,tag FROM marc_subfield_table WHERE bibid=? AND tag BETWEEN ? AND ? ORDER BY tagorder");
496
497         $sth->execute($bibid,$mintag,$maxtag);
498
499         my @marcnotes;
500         my $note = "";
501         my $tag = "";
502         my $marcnote;
503
504         while (my $data=$sth->fetchrow_arrayref) {
505                 my $value=$data->[0];
506                 my $thistag=$data->[1];
507                 if ($value=~/\.$/) {
508                         $value=$value . "  ";
509                 }
510                 if ($thistag ne $tag && $note ne "") {
511                         $marcnote = {MARCNOTES => $note,};
512                         push @marcnotes, $marcnote;
513                         $note=$value;
514                         $tag=$thistag;
515                 }
516                 if ($note ne $value) {
517                         $note = $note." ".$value;
518                 }
519         }
520
521         if ($note) {
522                 $marcnote = {MARCNOTES => $note};
523                 push @marcnotes, $marcnote;   #load last tag into array
524         }
525
526         $sth->finish;
527         $dbh->disconnect;
528
529         my $marcnotesarray=\@marcnotes;
530         return $marcnotesarray;
531 }  # end getMARCnotes
532
533
534 sub getMARCsubjects {
535     my ($dbh, $bibid, $marcflavour) = @_;
536         my ($mintag, $maxtag);
537         if ($marcflavour eq "MARC21") {
538                 $mintag = "600";
539                 $maxtag = "699";
540         } else {           # assume unimarc if not marc21
541                 $mintag = "600";
542                 $maxtag = "619";
543         }
544         my $sth=$dbh->prepare("SELECT subfieldvalue,subfieldcode FROM marc_subfield_table WHERE bibid=? AND tag BETWEEN ? AND ? ORDER BY tagorder");
545
546         $sth->execute($bibid,$mintag,$maxtag);
547
548         my @marcsubjcts;
549         my $subjct = "";
550         my $subfield = "";
551         my $marcsubjct;
552
553         while (my $data=$sth->fetchrow_arrayref) {
554                 my $value = $data->[0];
555                 my $subfield = $data->[1];
556                 if ($subfield eq "a" && $value ne $subjct) {
557                         $marcsubjct = {MARCSUBJCT => $value,};
558                         push @marcsubjcts, $marcsubjct;
559                         $subjct = $value;
560                 }
561         }
562
563         $sth->finish;
564         $dbh->disconnect;
565
566         my $marcsubjctsarray=\@marcsubjcts;
567         return $marcsubjctsarray;
568 }  #end getMARCsubjects
569
570 END { }       # module clean-up code here (global destructor)
571
572 1;
573 __END__
574
575 =back
576
577 =head1 AUTHOR
578
579 Koha Developement team <info@koha.org>
580
581 =cut