POD Cleanups
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com> Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
546a0244bb
commit
aa9b4d92cd
|
|
@ -90,26 +90,48 @@ These are read-only accessors for attributes of a C4::Category object.
|
|||
|
||||
=head3 $category->categorycode
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->description
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->enrolmentperiod
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->upperagelimit
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->dateofbirthrequired
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->finetype
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->bulk
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->enrolmentfee
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->overduenoticerequired
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->issuelimit
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->reservefee
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $category->category_type
|
||||
|
||||
=cut
|
||||
|
|
|
|||
102
C4/Charset.pm
102
C4/Charset.pm
|
|
@ -47,7 +47,7 @@ C4::Charset - utilities for handling character set conversions.
|
|||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use C4::Charset;
|
||||
use C4::Charset;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
@ -76,16 +76,12 @@ on how to deal with the situation.
|
|||
|
||||
=head2 IsStringUTF8ish
|
||||
|
||||
=over 4
|
||||
|
||||
my $is_utf8 = IsStringUTF8ish($str);
|
||||
|
||||
=back
|
||||
my $is_utf8 = IsStringUTF8ish($str);
|
||||
|
||||
Determines if C<$str> is valid UTF-8. This can mean
|
||||
one of two things:
|
||||
|
||||
=over 2
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
|
|
@ -115,11 +111,7 @@ sub IsStringUTF8ish {
|
|||
|
||||
=head2 SetUTF8Flag
|
||||
|
||||
=over 4
|
||||
|
||||
my $marc_record = SetUTF8Flag($marc_record);
|
||||
|
||||
=back
|
||||
my $marc_record = SetUTF8Flag($marc_record);
|
||||
|
||||
This function sets the PERL UTF8 flag for data.
|
||||
It is required when using new_from_usmarc
|
||||
|
|
@ -156,24 +148,21 @@ sub SetUTF8Flag{
|
|||
|
||||
=head2 NormalizeString
|
||||
|
||||
=over 4
|
||||
|
||||
my $normalized_string=NormalizeString($string);
|
||||
|
||||
=back
|
||||
Given a string
|
||||
|
||||
Given
|
||||
a string
|
||||
nfc : If you want to set NFC and not NFD
|
||||
transform : If you expect all the signs to be removed
|
||||
Sets the PERL UTF8 Flag on your initial data if need be
|
||||
and applies cleaning if required
|
||||
|
||||
Returns a utf8 NFD normalized string
|
||||
|
||||
Sample code :
|
||||
my $string=NormalizeString ("l'ornithoptère");
|
||||
nfc : If you want to set NFC and not NFD
|
||||
transform : If you expect all the signs to be removed
|
||||
Sets the PERL UTF8 Flag on your initial data if need be
|
||||
and applies cleaning if required
|
||||
|
||||
Returns a utf8 NFD normalized string
|
||||
|
||||
Sample code :
|
||||
my $string=NormalizeString ("l'ornithoptère");
|
||||
#results into ornithoptère in NFD form and sets UTF8 Flag
|
||||
|
||||
=cut
|
||||
|
||||
sub NormalizeString{
|
||||
|
|
@ -196,11 +185,8 @@ sub NormalizeString{
|
|||
|
||||
=head2 MarcToUTF8Record
|
||||
|
||||
=over 4
|
||||
|
||||
($marc_record, $converted_from, $errors_arrayref) = MarcToUTF8Record($marc_blob, $marc_flavour, [, $source_encoding]);
|
||||
|
||||
=back
|
||||
($marc_record, $converted_from, $errors_arrayref) = MarcToUTF8Record($marc_blob,
|
||||
$marc_flavour, [, $source_encoding]);
|
||||
|
||||
Given a MARC blob or a C<MARC::Record>, the MARC flavour, and an
|
||||
optional source encoding, return a C<MARC::Record> that is
|
||||
|
|
@ -313,11 +299,7 @@ sub MarcToUTF8Record {
|
|||
|
||||
=head2 SetMarcUnicodeFlag
|
||||
|
||||
=over 4
|
||||
|
||||
SetMarcUnicodeFlag($marc_record, $marc_flavour);
|
||||
|
||||
=back
|
||||
SetMarcUnicodeFlag($marc_record, $marc_flavour);
|
||||
|
||||
Set both the internal MARC::Record encoding flag
|
||||
and the appropriate Leader/09 (MARC21) or
|
||||
|
|
@ -364,11 +346,7 @@ sub SetMarcUnicodeFlag {
|
|||
|
||||
=head2 StripNonXmlChars
|
||||
|
||||
=over 4
|
||||
|
||||
my $new_str = StripNonXmlChars($old_str);
|
||||
|
||||
=back
|
||||
my $new_str = StripNonXmlChars($old_str);
|
||||
|
||||
Given a string, return a copy with the
|
||||
characters that are illegal in XML
|
||||
|
|
@ -404,11 +382,7 @@ sub StripNonXmlChars {
|
|||
|
||||
=head2 _default_marc21_charconv_to_utf8
|
||||
|
||||
=over 4
|
||||
|
||||
my ($new_marc_record, $guessed_charset) = _default_marc21_charconv_to_utf8($marc_record);
|
||||
|
||||
=back
|
||||
my ($new_marc_record, $guessed_charset) = _default_marc21_charconv_to_utf8($marc_record);
|
||||
|
||||
Converts a C<MARC::Record> of unknown character set to UTF-8,
|
||||
first by trying a MARC-8 to UTF-8 conversion, then ISO-8859-1
|
||||
|
|
@ -450,11 +424,7 @@ sub _default_marc21_charconv_to_utf8 {
|
|||
|
||||
=head2 _default_unimarc_charconv_to_utf8
|
||||
|
||||
=over 4
|
||||
|
||||
my ($new_marc_record, $guessed_charset) = _default_unimarc_charconv_to_utf8($marc_record);
|
||||
|
||||
=back
|
||||
my ($new_marc_record, $guessed_charset) = _default_unimarc_charconv_to_utf8($marc_record);
|
||||
|
||||
Converts a C<MARC::Record> of unknown character set to UTF-8,
|
||||
first by trying a ISO-5426 to UTF-8 conversion, then ISO-8859-1
|
||||
|
|
@ -494,11 +464,7 @@ sub _default_unimarc_charconv_to_utf8 {
|
|||
|
||||
=head2 _marc_marc8_to_utf8
|
||||
|
||||
=over 4
|
||||
|
||||
my @errors = _marc_marc8_to_utf8($marc_record, $marc_flavour, $source_encoding);
|
||||
|
||||
=back
|
||||
my @errors = _marc_marc8_to_utf8($marc_record, $marc_flavour, $source_encoding);
|
||||
|
||||
Convert a C<MARC::Record> to UTF-8 in-place from MARC-8.
|
||||
If the conversion fails for some reason, an
|
||||
|
|
@ -569,11 +535,7 @@ sub _marc_marc8_to_utf8 {
|
|||
|
||||
=head2 _marc_iso5426_to_utf8
|
||||
|
||||
=over 4
|
||||
|
||||
my @errors = _marc_iso5426_to_utf8($marc_record, $marc_flavour, $source_encoding);
|
||||
|
||||
=back
|
||||
my @errors = _marc_iso5426_to_utf8($marc_record, $marc_flavour, $source_encoding);
|
||||
|
||||
Convert a C<MARC::Record> to UTF-8 in-place from ISO-5426.
|
||||
If the conversion fails for some reason, an
|
||||
|
|
@ -615,11 +577,7 @@ sub _marc_iso5426_to_utf8 {
|
|||
|
||||
=head2 _marc_to_utf8_via_text_iconv
|
||||
|
||||
=over 4
|
||||
|
||||
my @errors = _marc_to_utf8_via_text_iconv($marc_record, $marc_flavour, $source_encoding);
|
||||
|
||||
=back
|
||||
my @errors = _marc_to_utf8_via_text_iconv($marc_record, $marc_flavour, $source_encoding);
|
||||
|
||||
Convert a C<MARC::Record> to UTF-8 in-place using the
|
||||
C<Text::Iconv> CPAN module. Any source encoding accepted
|
||||
|
|
@ -688,11 +646,7 @@ sub _marc_to_utf8_via_text_iconv {
|
|||
|
||||
=head2 _marc_to_utf8_replacement_char
|
||||
|
||||
=over 4
|
||||
|
||||
_marc_to_utf8_replacement_char($marc_record, $marc_flavour);
|
||||
|
||||
=back
|
||||
_marc_to_utf8_replacement_char($marc_record, $marc_flavour);
|
||||
|
||||
Convert a C<MARC::Record> to UTF-8 in-place, adopting the
|
||||
unsatisfactory method of replacing all non-ASCII (e.g.,
|
||||
|
|
@ -731,11 +685,7 @@ sub _marc_to_utf8_replacement_char {
|
|||
|
||||
=head2 char_decode5426
|
||||
|
||||
=over 4
|
||||
|
||||
my $utf8string = char_decode5426($iso_5426_string);
|
||||
|
||||
=back
|
||||
my $utf8string = char_decode5426($iso_5426_string);
|
||||
|
||||
Converts a string from ISO-5426 to UTF-8.
|
||||
|
||||
|
|
|
|||
|
|
@ -117,11 +117,9 @@ Also deals with stocktaking.
|
|||
|
||||
=head2 barcodedecode
|
||||
|
||||
=head3 $str = &barcodedecode($barcode, [$filter]);
|
||||
$str = &barcodedecode($barcode, [$filter]);
|
||||
|
||||
=over 4
|
||||
|
||||
=item Generic filter function for barcode string.
|
||||
Generic filter function for barcode string.
|
||||
Called on every circ if the System Pref itemBarcodeInputFilter is set.
|
||||
Will do some manipulation of the barcode for systems that deliver a barcode
|
||||
to circulation.pl that differs from the barcode stored for the item.
|
||||
|
|
@ -132,8 +130,6 @@ The optional $filter argument is to allow for testing or explicit
|
|||
behavior that ignores the System Pref. Valid values are the same as the
|
||||
System Pref options.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
# FIXME -- the &decode fcn below should be wrapped into this one.
|
||||
|
|
@ -165,18 +161,14 @@ sub barcodedecode {
|
|||
|
||||
=head2 decode
|
||||
|
||||
=head3 $str = &decode($chunk);
|
||||
$str = &decode($chunk);
|
||||
|
||||
=over 4
|
||||
|
||||
=item Decodes a segment of a string emitted by a CueCat barcode scanner and
|
||||
Decodes a segment of a string emitted by a CueCat barcode scanner and
|
||||
returns it.
|
||||
|
||||
FIXME: Should be replaced with Barcode::Cuecat from CPAN
|
||||
or Javascript based decoding on the client side.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub decode {
|
||||
|
|
@ -208,7 +200,8 @@ sub decode {
|
|||
|
||||
=head2 transferbook
|
||||
|
||||
($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, $barcode, $ignore_reserves);
|
||||
($dotransfer, $messages, $iteminformation) = &transferbook($newbranch,
|
||||
$barcode, $ignore_reserves);
|
||||
|
||||
Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
|
||||
|
||||
|
|
@ -221,15 +214,17 @@ Otherwise, if an item is reserved, the transfer fails.
|
|||
|
||||
Returns three values:
|
||||
|
||||
=head3 $dotransfer
|
||||
=over
|
||||
|
||||
=item $dotransfer
|
||||
|
||||
is true if the transfer was successful.
|
||||
|
||||
=head3 $messages
|
||||
=item $messages
|
||||
|
||||
is a reference-to-hash which may have any of the following keys:
|
||||
|
||||
=over 4
|
||||
=over
|
||||
|
||||
=item C<BadBarcode>
|
||||
|
||||
|
|
@ -257,6 +252,8 @@ The item was eligible to be transferred. Barring problems communicating with the
|
|||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub transferbook {
|
||||
|
|
@ -561,9 +558,10 @@ sub itemissues {
|
|||
|
||||
=head2 CanBookBeIssued
|
||||
|
||||
Check if a book can be issued.
|
||||
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $borrower,
|
||||
$barcode, $duedatespec, $inprocess );
|
||||
|
||||
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $borrower, $barcode, $duedatespec, $inprocess );
|
||||
Check if a book can be issued.
|
||||
|
||||
C<$issuingimpossible> and C<$needsconfirmation> are some hashref.
|
||||
|
||||
|
|
@ -620,8 +618,8 @@ item withdrawn.
|
|||
|
||||
item is restricted (set by ??)
|
||||
|
||||
C<$needsconfirmation> a reference to a hash. It contains reasons why the loan could be prevented,
|
||||
but ones that can be overriden by the operator.
|
||||
C<$needsconfirmation> a reference to a hash. It contains reasons why the loan
|
||||
could be prevented, but ones that can be overriden by the operator.
|
||||
|
||||
Possible values are :
|
||||
|
||||
|
|
@ -866,9 +864,9 @@ sub CanBookBeIssued {
|
|||
|
||||
=head2 AddIssue
|
||||
|
||||
Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this sub, it means the user confirmed if needed.
|
||||
&AddIssue($borrower, $barcode, [$datedue], [$cancelreserve], [$issuedate])
|
||||
|
||||
&AddIssue($borrower, $barcode, [$datedue], [$cancelreserve], [$issuedate])
|
||||
Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this sub, it means the user confirmed if needed.
|
||||
|
||||
=over 4
|
||||
|
||||
|
|
@ -1076,9 +1074,9 @@ sub AddIssue {
|
|||
|
||||
=head2 GetLoanLength
|
||||
|
||||
Get loan length for an itemtype, a borrower type and a branch
|
||||
my $loanlength = &GetLoanLength($borrowertype,$itemtype,branchcode)
|
||||
|
||||
my $loanlength = &GetLoanLength($borrowertype,$itemtype,branchcode)
|
||||
Get loan length for an itemtype, a borrower type and a branch
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1138,6 +1136,8 @@ sub GetLoanLength {
|
|||
|
||||
=head2 GetIssuingRule
|
||||
|
||||
my $irule = &GetIssuingRule($borrowertype,$itemtype,branchcode)
|
||||
|
||||
FIXME - This is a copy-paste of GetLoanLength
|
||||
as a stop-gap. Do not wish to change API for GetLoanLength
|
||||
this close to release, however, Overdues::GetIssuingRules is broken.
|
||||
|
|
@ -1145,8 +1145,6 @@ this close to release, however, Overdues::GetIssuingRules is broken.
|
|||
Get the issuing rule for an itemtype, a borrower type and a branch
|
||||
Returns a hashref from the issuingrules table.
|
||||
|
||||
my $irule = &GetIssuingRule($borrowertype,$itemtype,branchcode)
|
||||
|
||||
=cut
|
||||
|
||||
sub GetIssuingRule {
|
||||
|
|
@ -1193,11 +1191,7 @@ sub GetIssuingRule {
|
|||
|
||||
=head2 GetBranchBorrowerCircRule
|
||||
|
||||
=over 4
|
||||
|
||||
my $branch_cat_rule = GetBranchBorrowerCircRule($branchcode, $categorycode);
|
||||
|
||||
=back
|
||||
my $branch_cat_rule = GetBranchBorrowerCircRule($branchcode, $categorycode);
|
||||
|
||||
Retrieves circulation rule attributes that apply to the given
|
||||
branch and patron category, regardless of item type.
|
||||
|
|
@ -1280,11 +1274,7 @@ sub GetBranchBorrowerCircRule {
|
|||
|
||||
=head2 GetBranchItemRule
|
||||
|
||||
=over 4
|
||||
|
||||
my $branch_item_rule = GetBranchItemRule($branchcode, $itemtype);
|
||||
|
||||
=back
|
||||
my $branch_item_rule = GetBranchItemRule($branchcode, $itemtype);
|
||||
|
||||
Retrieves circulation rule attributes that apply to the given
|
||||
branch and item type, regardless of patron category.
|
||||
|
|
@ -1344,8 +1334,8 @@ sub GetBranchItemRule {
|
|||
|
||||
=head2 AddReturn
|
||||
|
||||
($doreturn, $messages, $iteminformation, $borrower) =
|
||||
&AddReturn($barcode, $branch, $exemptfine, $dropbox);
|
||||
($doreturn, $messages, $iteminformation, $borrower) =
|
||||
&AddReturn($barcode, $branch, $exemptfine, $dropbox);
|
||||
|
||||
Returns a book.
|
||||
|
||||
|
|
@ -1599,11 +1589,7 @@ sub AddReturn {
|
|||
|
||||
=head2 MarkIssueReturned
|
||||
|
||||
=over 4
|
||||
|
||||
MarkIssueReturned($borrowernumber, $itemnumber, $dropbox_branch, $returndate);
|
||||
|
||||
=back
|
||||
MarkIssueReturned($borrowernumber, $itemnumber, $dropbox_branch, $returndate);
|
||||
|
||||
Unconditionally marks an issue as being returned by
|
||||
moving the C<issues> row to C<old_issues> and
|
||||
|
|
@ -1654,7 +1640,7 @@ sub MarkIssueReturned {
|
|||
|
||||
=head2 _FixOverduesOnReturn
|
||||
|
||||
&_FixOverduesOnReturn($brn,$itm, $exemptfine, $dropboxmode);
|
||||
&_FixOverduesOnReturn($brn,$itm, $exemptfine, $dropboxmode);
|
||||
|
||||
C<$brn> borrowernumber
|
||||
|
||||
|
|
@ -1718,7 +1704,7 @@ sub _FixOverduesOnReturn {
|
|||
|
||||
=head2 _FixAccountForLostAndReturned
|
||||
|
||||
&_FixAccountForLostAndReturned($itemnumber, [$borrowernumber, $barcode]);
|
||||
&_FixAccountForLostAndReturned($itemnumber, [$borrowernumber, $barcode]);
|
||||
|
||||
Calculates the charge for a book lost and returned.
|
||||
|
||||
|
|
@ -1849,7 +1835,7 @@ sub _GetCircControlBranch {
|
|||
|
||||
=head2 GetItemIssue
|
||||
|
||||
$issue = &GetItemIssue($itemnumber);
|
||||
$issue = &GetItemIssue($itemnumber);
|
||||
|
||||
Returns patron currently having a book, or undef if not checked out.
|
||||
|
||||
|
|
@ -1876,7 +1862,7 @@ sub GetItemIssue {
|
|||
|
||||
=head2 GetOpenIssue
|
||||
|
||||
$issue = GetOpenIssue( $itemnumber );
|
||||
$issue = GetOpenIssue( $itemnumber );
|
||||
|
||||
Returns the row from the issues table if the item is currently issued, undef if the item is not currently issued
|
||||
|
||||
|
|
@ -1898,7 +1884,7 @@ sub GetOpenIssue {
|
|||
|
||||
=head2 GetItemIssues
|
||||
|
||||
$issues = &GetItemIssues($itemnumber, $history);
|
||||
$issues = &GetItemIssues($itemnumber, $history);
|
||||
|
||||
Returns patrons that have issued a book
|
||||
|
||||
|
|
@ -1941,7 +1927,7 @@ sub GetItemIssues {
|
|||
|
||||
=head2 GetBiblioIssues
|
||||
|
||||
$issues = GetBiblioIssues($biblionumber);
|
||||
$issues = GetBiblioIssues($biblionumber);
|
||||
|
||||
this function get all issues from a biblionumber.
|
||||
|
||||
|
|
@ -1985,11 +1971,7 @@ sub GetBiblioIssues {
|
|||
|
||||
=head2 GetUpcomingDueIssues
|
||||
|
||||
=over 4
|
||||
|
||||
my $upcoming_dues = GetUpcomingDueIssues( { days_in_advance => 4 } );
|
||||
|
||||
=back
|
||||
my $upcoming_dues = GetUpcomingDueIssues( { days_in_advance => 4 } );
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -2019,7 +2001,7 @@ END_SQL
|
|||
|
||||
=head2 CanBookBeRenewed
|
||||
|
||||
($ok,$error) = &CanBookBeRenewed($borrowernumber, $itemnumber[, $override_limit]);
|
||||
($ok,$error) = &CanBookBeRenewed($borrowernumber, $itemnumber[, $override_limit]);
|
||||
|
||||
Find out whether a borrowed item may be renewed.
|
||||
|
||||
|
|
@ -2111,7 +2093,7 @@ sub CanBookBeRenewed {
|
|||
|
||||
=head2 AddRenewal
|
||||
|
||||
&AddRenewal($borrowernumber, $itemnumber, $branch, [$datedue], [$lastreneweddate]);
|
||||
&AddRenewal($borrowernumber, $itemnumber, $branch, [$datedue], [$lastreneweddate]);
|
||||
|
||||
Renews a loan.
|
||||
|
||||
|
|
@ -2248,7 +2230,7 @@ sub GetRenewCount {
|
|||
|
||||
=head2 GetIssuingCharges
|
||||
|
||||
($charge, $item_type) = &GetIssuingCharges($itemnumber, $borrowernumber);
|
||||
($charge, $item_type) = &GetIssuingCharges($itemnumber, $borrowernumber);
|
||||
|
||||
Calculate how much it would cost for a given patron to borrow a given
|
||||
item, including any applicable discounts.
|
||||
|
|
@ -2307,7 +2289,7 @@ sub GetIssuingCharges {
|
|||
|
||||
=head2 AddIssuingCharge
|
||||
|
||||
&AddIssuingCharge( $itemno, $borrowernumber, $charge )
|
||||
&AddIssuingCharge( $itemno, $borrowernumber, $charge )
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -2329,7 +2311,7 @@ sub AddIssuingCharge {
|
|||
|
||||
=head2 GetTransfers
|
||||
|
||||
GetTransfers($itemnumber);
|
||||
GetTransfers($itemnumber);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -2355,7 +2337,7 @@ sub GetTransfers {
|
|||
|
||||
=head2 GetTransfersFromTo
|
||||
|
||||
@results = GetTransfersFromTo($frombranch,$tobranch);
|
||||
@results = GetTransfersFromTo($frombranch,$tobranch);
|
||||
|
||||
Returns the list of pending transfers between $from and $to branch
|
||||
|
||||
|
|
@ -2385,7 +2367,7 @@ sub GetTransfersFromTo {
|
|||
|
||||
=head2 DeleteTransfer
|
||||
|
||||
&DeleteTransfer($itemnumber);
|
||||
&DeleteTransfer($itemnumber);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -2403,7 +2385,7 @@ sub DeleteTransfer {
|
|||
|
||||
=head2 AnonymiseIssueHistory
|
||||
|
||||
$rows = AnonymiseIssueHistory($borrowernumber,$date)
|
||||
$rows = AnonymiseIssueHistory($borrowernumber,$date)
|
||||
|
||||
This function write NULL instead of C<$borrowernumber> given on input arg into the table issues.
|
||||
if C<$borrowernumber> is not set, it will delete the issue history for all borrower older than C<$date>.
|
||||
|
|
@ -2500,7 +2482,7 @@ sub SendCirculationAlert {
|
|||
|
||||
=head2 updateWrongTransfer
|
||||
|
||||
$items = updateWrongTransfer($itemNumber,$borrowernumber,$waitingAtLibrary,$FromLibrary);
|
||||
$items = updateWrongTransfer($itemNumber,$borrowernumber,$waitingAtLibrary,$FromLibrary);
|
||||
|
||||
This function validate the line of brachtransfer but with the wrong destination (mistake from a librarian ...), and create a new line in branchtransfer from the actual library to the original library of reservation
|
||||
|
||||
|
|
@ -2526,7 +2508,8 @@ sub updateWrongTransfer {
|
|||
|
||||
=head2 UpdateHoldingbranch
|
||||
|
||||
$items = UpdateHoldingbranch($branch,$itmenumber);
|
||||
$items = UpdateHoldingbranch($branch,$itmenumber);
|
||||
|
||||
Simple methode for updating hodlingbranch in items BDD line
|
||||
|
||||
=cut
|
||||
|
|
@ -2578,15 +2561,18 @@ sub CalcDateDue {
|
|||
}
|
||||
|
||||
=head2 CheckValidDatedue
|
||||
This function does not account for holiday exceptions nor does it handle the 'useDaysMode' syspref .
|
||||
To be replaced by CalcDateDue() once C4::Calendar use is tested.
|
||||
|
||||
$newdatedue = CheckValidDatedue($date_due,$itemnumber,$branchcode);
|
||||
$newdatedue = CheckValidDatedue($date_due,$itemnumber,$branchcode);
|
||||
|
||||
This function does not account for holiday exceptions nor does it handle the 'useDaysMode' syspref .
|
||||
To be replaced by CalcDateDue() once C4::Calendar use is tested.
|
||||
|
||||
this function validates the loan length against the holidays calendar, and adjusts the due date as per the 'useDaysMode' syspref.
|
||||
C<$date_due> = returndate calculate with no day check
|
||||
C<$itemnumber> = itemnumber
|
||||
C<$branchcode> = location of issue (affected by 'CircControl' syspref)
|
||||
C<$loanlength> = loan length prior to adjustment
|
||||
|
||||
=cut
|
||||
|
||||
sub CheckValidDatedue {
|
||||
|
|
@ -2615,8 +2601,10 @@ return $newdatedue;
|
|||
|
||||
=head2 CheckRepeatableHolidays
|
||||
|
||||
$countrepeatable = CheckRepeatableHoliday($itemnumber,$week_day,$branchcode);
|
||||
this function checks if the date due is a repeatable holiday
|
||||
$countrepeatable = CheckRepeatableHoliday($itemnumber,$week_day,$branchcode);
|
||||
|
||||
This function checks if the date due is a repeatable holiday
|
||||
|
||||
C<$date_due> = returndate calculate with no day check
|
||||
C<$itemnumber> = itemnumber
|
||||
C<$branchcode> = localisation of issue
|
||||
|
|
@ -2640,8 +2628,10 @@ return $result;
|
|||
|
||||
=head2 CheckSpecialHolidays
|
||||
|
||||
$countspecial = CheckSpecialHolidays($years,$month,$day,$itemnumber,$branchcode);
|
||||
this function check if the date is a special holiday
|
||||
$countspecial = CheckSpecialHolidays($years,$month,$day,$itemnumber,$branchcode);
|
||||
|
||||
This function check if the date is a special holiday
|
||||
|
||||
C<$years> = the years of datedue
|
||||
C<$month> = the month of datedue
|
||||
C<$day> = the day of datedue
|
||||
|
|
@ -2669,8 +2659,10 @@ return $countspecial;
|
|||
|
||||
=head2 CheckRepeatableSpecialHolidays
|
||||
|
||||
$countspecial = CheckRepeatableSpecialHolidays($month,$day,$itemnumber,$branchcode);
|
||||
this function check if the date is a repeatble special holidays
|
||||
$countspecial = CheckRepeatableSpecialHolidays($month,$day,$itemnumber,$branchcode);
|
||||
|
||||
This function check if the date is a repeatble special holidays
|
||||
|
||||
C<$month> = the month of datedue
|
||||
C<$day> = the day of datedue
|
||||
C<$itemnumber> = itemnumber
|
||||
|
|
@ -2712,7 +2704,7 @@ return $exist;
|
|||
|
||||
=head2 IsBranchTransferAllowed
|
||||
|
||||
$allowed = IsBranchTransferAllowed( $toBranch, $fromBranch, $code );
|
||||
$allowed = IsBranchTransferAllowed( $toBranch, $fromBranch, $code );
|
||||
|
||||
Code is either an itemtype or collection doe depending on the pref BranchTransferLimitsType
|
||||
|
||||
|
|
@ -2740,7 +2732,7 @@ sub IsBranchTransferAllowed {
|
|||
|
||||
=head2 CreateBranchTransferLimit
|
||||
|
||||
CreateBranchTransferLimit( $toBranch, $fromBranch, $code );
|
||||
CreateBranchTransferLimit( $toBranch, $fromBranch, $code );
|
||||
|
||||
$code is either itemtype or collection code depending on what the pref BranchTransferLimitsType is set to.
|
||||
|
||||
|
|
@ -2759,7 +2751,7 @@ sub CreateBranchTransferLimit {
|
|||
|
||||
=head2 DeleteBranchTransferLimits
|
||||
|
||||
DeleteBranchTransferLimits();
|
||||
DeleteBranchTransferLimits();
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ C4::Heading
|
|||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use C4::Heading;
|
||||
my $heading = C4::Heading->new_from_bib_field($field);
|
||||
my $thesaurus = $heading->thesaurus();
|
||||
my $type = $heading->type();
|
||||
my $display_heading = $heading->display();
|
||||
my $search_string = $heading->search_string();
|
||||
use C4::Heading;
|
||||
my $heading = C4::Heading->new_from_bib_field($field);
|
||||
my $thesaurus = $heading->thesaurus();
|
||||
my $type = $heading->type();
|
||||
my $display_heading = $heading->display();
|
||||
my $search_string = $heading->search_string();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
@ -49,11 +49,7 @@ headings found in bibliographic and authority records.
|
|||
|
||||
=head2 new_from_bib_field
|
||||
|
||||
=over 4
|
||||
|
||||
my $heading = C4::Heading->new_from_bib_field($field[, $marc_flavour]);
|
||||
|
||||
=back
|
||||
my $heading = C4::Heading->new_from_bib_field($field[, $marc_flavour]);
|
||||
|
||||
Given a C<MARC::Field> object containing a heading from a
|
||||
bib record, create a C<C4::Heading> object.
|
||||
|
|
@ -88,11 +84,7 @@ sub new_from_bib_field {
|
|||
|
||||
=head2 display_form
|
||||
|
||||
=over 4
|
||||
|
||||
my $display = $heading->display_form();
|
||||
|
||||
=back
|
||||
my $display = $heading->display_form();
|
||||
|
||||
Return the "canonical" display form of the heading.
|
||||
|
||||
|
|
@ -105,11 +97,7 @@ sub display_form {
|
|||
|
||||
=head2 authorities
|
||||
|
||||
=over 4
|
||||
|
||||
my $authorities = $heading->authorities;
|
||||
|
||||
=back
|
||||
my $authorities = $heading->authorities;
|
||||
|
||||
Return a list of authority records for this
|
||||
heading.
|
||||
|
|
@ -126,11 +114,7 @@ sub authorities {
|
|||
|
||||
=head2 preferred_authorities
|
||||
|
||||
=over 4
|
||||
|
||||
my $preferred_authorities = $heading->preferred_authorities;
|
||||
|
||||
=back
|
||||
my $preferred_authorities = $heading->preferred_authorities;
|
||||
|
||||
Return a list of authority records for headings
|
||||
that are a preferred form of the heading.
|
||||
|
|
|
|||
|
|
@ -78,21 +78,13 @@ C4::ImportBatch - manage batches of imported MARC records
|
|||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=over 4
|
||||
|
||||
use C4::ImportBatch;
|
||||
|
||||
=back
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=head2 GetZ3950BatchId
|
||||
|
||||
=over 4
|
||||
|
||||
my $batchid = GetZ3950BatchId($z3950server);
|
||||
|
||||
=back
|
||||
my $batchid = GetZ3950BatchId($z3950server);
|
||||
|
||||
Retrieves the ID of the import batch for the Z39.50
|
||||
reservoir for the given target. If necessary,
|
||||
|
|
@ -121,11 +113,7 @@ sub GetZ3950BatchId {
|
|||
|
||||
=head2 GetImportRecordMarc
|
||||
|
||||
=over 4
|
||||
|
||||
my ($marcblob, $encoding) = GetImportRecordMarc($import_record_id);
|
||||
|
||||
=back
|
||||
my ($marcblob, $encoding) = GetImportRecordMarc($import_record_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -143,11 +131,8 @@ sub GetImportRecordMarc {
|
|||
|
||||
=head2 AddImportBatch
|
||||
|
||||
=over 4
|
||||
|
||||
my $batch_id = AddImportBatch($overlay_action, $import_status, $type, $file_name, $comments);
|
||||
|
||||
=back
|
||||
my $batch_id = AddImportBatch($overlay_action, $import_status, $type,
|
||||
$file_name, $comments);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -168,11 +153,7 @@ sub AddImportBatch {
|
|||
|
||||
=head2 GetImportBatch
|
||||
|
||||
=over 4
|
||||
|
||||
my $row = GetImportBatch($batch_id);
|
||||
|
||||
=back
|
||||
my $row = GetImportBatch($batch_id);
|
||||
|
||||
Retrieve a hashref of an import_batches row.
|
||||
|
||||
|
|
@ -193,11 +174,8 @@ sub GetImportBatch {
|
|||
|
||||
=head2 AddBiblioToBatch
|
||||
|
||||
=over 4
|
||||
|
||||
my $import_record_id = AddBiblioToBatch($batch_id, $record_sequence, $marc_record, $encoding, $z3950random, $update_counts);
|
||||
|
||||
=back
|
||||
my $import_record_id = AddBiblioToBatch($batch_id, $record_sequence,
|
||||
$marc_record, $encoding, $z3950random, $update_counts);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -217,11 +195,7 @@ sub AddBiblioToBatch {
|
|||
|
||||
=head2 ModBiblioInBatch
|
||||
|
||||
=over 4
|
||||
|
||||
ModBiblioInBatch($import_record_id, $marc_record);
|
||||
|
||||
=back
|
||||
ModBiblioInBatch($import_record_id, $marc_record);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -235,16 +209,12 @@ sub ModBiblioInBatch {
|
|||
|
||||
=head2 BatchStageMarcRecords
|
||||
|
||||
=over 4
|
||||
|
||||
($batch_id, $num_records, $num_items, @invalid_records) =
|
||||
($batch_id, $num_records, $num_items, @invalid_records) =
|
||||
BatchStageMarcRecords($marc_flavor, $marc_records, $file_name,
|
||||
$comments, $branch_code, $parse_items,
|
||||
$leave_as_staging,
|
||||
$progress_interval, $progress_callback);
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub BatchStageMarcRecords {
|
||||
|
|
@ -311,11 +281,8 @@ sub BatchStageMarcRecords {
|
|||
|
||||
=head2 AddItemsToImportBiblio
|
||||
|
||||
=over 4
|
||||
|
||||
my @import_items_ids = AddItemsToImportBiblio($batch_id, $import_record_id, $marc_record, $update_counts);
|
||||
|
||||
=back
|
||||
my @import_items_ids = AddItemsToImportBiblio($batch_id,
|
||||
$import_record_id, $marc_record, $update_counts);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -353,11 +320,8 @@ sub AddItemsToImportBiblio {
|
|||
|
||||
=head2 BatchFindBibDuplicates
|
||||
|
||||
=over 4
|
||||
|
||||
my $num_with_matches = BatchFindBibDuplicates($batch_id, $matcher, $max_matches, $progress_interval, $progress_callback);
|
||||
|
||||
=back
|
||||
my $num_with_matches = BatchFindBibDuplicates($batch_id, $matcher,
|
||||
$max_matches, $progress_interval, $progress_callback);
|
||||
|
||||
Goes through the records loaded in the batch and attempts to
|
||||
find duplicates for each one. Sets the matching status
|
||||
|
|
@ -424,12 +388,9 @@ sub BatchFindBibDuplicates {
|
|||
|
||||
=head2 BatchCommitBibRecords
|
||||
|
||||
=over 4
|
||||
|
||||
my ($num_added, $num_updated, $num_items_added, $num_items_errored, $num_ignored) =
|
||||
BatchCommitBibRecords($batch_id, $progress_interval, $progress_callback);
|
||||
|
||||
=back
|
||||
my ($num_added, $num_updated, $num_items_added, $num_items_errored,
|
||||
$num_ignored) = BatchCommitBibRecords($batch_id,
|
||||
$progress_interval, $progress_callback);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -550,11 +511,8 @@ sub BatchCommitBibRecords {
|
|||
|
||||
=head2 BatchCommitItems
|
||||
|
||||
=over 4
|
||||
|
||||
($num_items_added, $num_items_errored) = BatchCommitItems($import_record_id, $biblionumber);
|
||||
|
||||
=back
|
||||
($num_items_added, $num_items_errored) =
|
||||
BatchCommitItems($import_record_id, $biblionumber);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -601,11 +559,8 @@ sub BatchCommitItems {
|
|||
|
||||
=head2 BatchRevertBibRecords
|
||||
|
||||
=over 4
|
||||
|
||||
my ($num_deleted, $num_errors, $num_reverted, $num_items_deleted, $num_ignored) = BatchRevertBibRecords($batch_id);
|
||||
|
||||
=back
|
||||
my ($num_deleted, $num_errors, $num_reverted, $num_items_deleted,
|
||||
$num_ignored) = BatchRevertBibRecords($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -668,11 +623,7 @@ sub BatchRevertBibRecords {
|
|||
|
||||
=head2 BatchRevertItems
|
||||
|
||||
=over 4
|
||||
|
||||
my $num_items_deleted = BatchRevertItems($import_record_id, $biblionumber);
|
||||
|
||||
=back
|
||||
my $num_items_deleted = BatchRevertItems($import_record_id, $biblionumber);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -703,11 +654,7 @@ sub BatchRevertItems {
|
|||
|
||||
=head2 CleanBatch
|
||||
|
||||
=over 4
|
||||
|
||||
CleanBatch($batch_id)
|
||||
|
||||
=back
|
||||
CleanBatch($batch_id)
|
||||
|
||||
Deletes all staged records from the import batch
|
||||
and sets the status of the batch to 'cleaned'. Note
|
||||
|
|
@ -726,11 +673,7 @@ sub CleanBatch {
|
|||
|
||||
=head2 GetAllImportBatches
|
||||
|
||||
=over 4
|
||||
|
||||
my $results = GetAllImportBatches();
|
||||
|
||||
=back
|
||||
my $results = GetAllImportBatches();
|
||||
|
||||
Returns a references to an array of hash references corresponding
|
||||
to all import_batches rows (of batch_type 'batch'), sorted in
|
||||
|
|
@ -755,11 +698,7 @@ sub GetAllImportBatches {
|
|||
|
||||
=head2 GetImportBatchRangeDesc
|
||||
|
||||
=over 4
|
||||
|
||||
my $results = GetImportBatchRangeDesc($offset, $results_per_group);
|
||||
|
||||
=back
|
||||
my $results = GetImportBatchRangeDesc($offset, $results_per_group);
|
||||
|
||||
Returns a reference to an array of hash references corresponding to
|
||||
import_batches rows (sorted in descending order by import_batch_id)
|
||||
|
|
@ -792,6 +731,8 @@ sub GetImportBatchRangeDesc {
|
|||
|
||||
=head2 GetItemNumbersFromImportBatch
|
||||
|
||||
my @itemsnos = GetItemNumbersFromImportBatch($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
sub GetItemNumbersFromImportBatch {
|
||||
|
|
@ -808,11 +749,7 @@ sub GetItemNumbersFromImportBatch {
|
|||
|
||||
=head2 GetNumberOfImportBatches
|
||||
|
||||
=over 4
|
||||
|
||||
my $count = GetNumberOfImportBatches();
|
||||
|
||||
=back
|
||||
my $count = GetNumberOfImportBatches();
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -827,11 +764,7 @@ sub GetNumberOfNonZ3950ImportBatches {
|
|||
|
||||
=head2 GetImportBibliosRange
|
||||
|
||||
=over 4
|
||||
|
||||
my $results = GetImportBibliosRange($batch_id, $offset, $results_per_group);
|
||||
|
||||
=back
|
||||
my $results = GetImportBibliosRange($batch_id, $offset, $results_per_group);
|
||||
|
||||
Returns a reference to an array of hash references corresponding to
|
||||
import_biblios/import_records rows for a given batch
|
||||
|
|
@ -874,11 +807,7 @@ sub GetImportBibliosRange {
|
|||
|
||||
=head2 GetBestRecordMatch
|
||||
|
||||
=over 4
|
||||
|
||||
my $record_id = GetBestRecordMatch($import_record_id);
|
||||
|
||||
=back
|
||||
my $record_id = GetBestRecordMatch($import_record_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -898,11 +827,7 @@ sub GetBestRecordMatch {
|
|||
|
||||
=head2 GetImportBatchStatus
|
||||
|
||||
=over 4
|
||||
|
||||
my $status = GetImportBatchStatus($batch_id);
|
||||
|
||||
=back
|
||||
my $status = GetImportBatchStatus($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -920,11 +845,7 @@ sub GetImportBatchStatus {
|
|||
|
||||
=head2 SetImportBatchStatus
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportBatchStatus($batch_id, $new_status);
|
||||
|
||||
=back
|
||||
SetImportBatchStatus($batch_id, $new_status);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -940,11 +861,7 @@ sub SetImportBatchStatus {
|
|||
|
||||
=head2 GetImportBatchOverlayAction
|
||||
|
||||
=over 4
|
||||
|
||||
my $overlay_action = GetImportBatchOverlayAction($batch_id);
|
||||
|
||||
=back
|
||||
my $overlay_action = GetImportBatchOverlayAction($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -963,11 +880,7 @@ sub GetImportBatchOverlayAction {
|
|||
|
||||
=head2 SetImportBatchOverlayAction
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportBatchOverlayAction($batch_id, $new_overlay_action);
|
||||
|
||||
=back
|
||||
SetImportBatchOverlayAction($batch_id, $new_overlay_action);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -983,11 +896,7 @@ sub SetImportBatchOverlayAction {
|
|||
|
||||
=head2 GetImportBatchNoMatchAction
|
||||
|
||||
=over 4
|
||||
|
||||
my $nomatch_action = GetImportBatchNoMatchAction($batch_id);
|
||||
|
||||
=back
|
||||
my $nomatch_action = GetImportBatchNoMatchAction($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1006,11 +915,7 @@ sub GetImportBatchNoMatchAction {
|
|||
|
||||
=head2 SetImportBatchNoMatchAction
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportBatchNoMatchAction($batch_id, $new_nomatch_action);
|
||||
|
||||
=back
|
||||
SetImportBatchNoMatchAction($batch_id, $new_nomatch_action);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1026,11 +931,7 @@ sub SetImportBatchNoMatchAction {
|
|||
|
||||
=head2 GetImportBatchItemAction
|
||||
|
||||
=over 4
|
||||
|
||||
my $item_action = GetImportBatchItemAction($batch_id);
|
||||
|
||||
=back
|
||||
my $item_action = GetImportBatchItemAction($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1049,11 +950,7 @@ sub GetImportBatchItemAction {
|
|||
|
||||
=head2 SetImportBatchItemAction
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportBatchItemAction($batch_id, $new_item_action);
|
||||
|
||||
=back
|
||||
SetImportBatchItemAction($batch_id, $new_item_action);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1069,11 +966,7 @@ sub SetImportBatchItemAction {
|
|||
|
||||
=head2 GetImportBatchMatcher
|
||||
|
||||
=over 4
|
||||
|
||||
my $matcher_id = GetImportBatchMatcher($batch_id);
|
||||
|
||||
=back
|
||||
my $matcher_id = GetImportBatchMatcher($batch_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1092,11 +985,7 @@ sub GetImportBatchMatcher {
|
|||
|
||||
=head2 SetImportBatchMatcher
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportBatchMatcher($batch_id, $new_matcher_id);
|
||||
|
||||
=back
|
||||
SetImportBatchMatcher($batch_id, $new_matcher_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1112,11 +1001,7 @@ sub SetImportBatchMatcher {
|
|||
|
||||
=head2 GetImportRecordOverlayStatus
|
||||
|
||||
=over 4
|
||||
|
||||
my $overlay_status = GetImportRecordOverlayStatus($import_record_id);
|
||||
|
||||
=back
|
||||
my $overlay_status = GetImportRecordOverlayStatus($import_record_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1135,11 +1020,7 @@ sub GetImportRecordOverlayStatus {
|
|||
|
||||
=head2 SetImportRecordOverlayStatus
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportRecordOverlayStatus($import_record_id, $new_overlay_status);
|
||||
|
||||
=back
|
||||
SetImportRecordOverlayStatus($import_record_id, $new_overlay_status);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1155,11 +1036,7 @@ sub SetImportRecordOverlayStatus {
|
|||
|
||||
=head2 GetImportRecordStatus
|
||||
|
||||
=over 4
|
||||
|
||||
my $overlay_status = GetImportRecordStatus($import_record_id);
|
||||
|
||||
=back
|
||||
my $overlay_status = GetImportRecordStatus($import_record_id);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1178,11 +1055,7 @@ sub GetImportRecordStatus {
|
|||
|
||||
=head2 SetImportRecordStatus
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportRecordStatus($import_record_id, $new_overlay_status);
|
||||
|
||||
=back
|
||||
SetImportRecordStatus($import_record_id, $new_overlay_status);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1198,11 +1071,7 @@ sub SetImportRecordStatus {
|
|||
|
||||
=head2 GetImportRecordMatches
|
||||
|
||||
=over 4
|
||||
|
||||
my $results = GetImportRecordMatches($import_record_id, $best_only);
|
||||
|
||||
=back
|
||||
my $results = GetImportRecordMatches($import_record_id, $best_only);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1234,11 +1103,7 @@ sub GetImportRecordMatches {
|
|||
|
||||
=head2 SetImportRecordMatches
|
||||
|
||||
=over 4
|
||||
|
||||
SetImportRecordMatches($import_record_id, @matches);
|
||||
|
||||
=back
|
||||
SetImportRecordMatches($import_record_id, @matches);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
121
C4/Installer.pm
121
C4/Installer.pm
|
|
@ -30,35 +30,25 @@ C4::Installer
|
|||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use C4::Installer;
|
||||
|
||||
my $installer = C4::Installer->new();
|
||||
|
||||
my $all_languages = getAllLanguages();
|
||||
|
||||
my $error = $installer->load_db_schema();
|
||||
|
||||
my $list = $installer->sql_file_list('en', 'marc21', { optional => 1, mandatory => 1 });
|
||||
|
||||
my ($fwk_language, $error_list) = $installer->load_sql_in_order($all_languages, @$list);
|
||||
|
||||
$installer->set_version_syspref();
|
||||
|
||||
$installer->set_marcflavour_syspref('MARC21');
|
||||
|
||||
$installer->set_indexing_engine(0);
|
||||
use C4::Installer;
|
||||
my $installer = C4::Installer->new();
|
||||
my $all_languages = getAllLanguages();
|
||||
my $error = $installer->load_db_schema();
|
||||
my $list = $installer->sql_file_list('en', 'marc21', { optional => 1, mandatory => 1 });
|
||||
my ($fwk_language, $error_list) = $installer->load_sql_in_order($all_languages, @$list);
|
||||
$installer->set_version_syspref();
|
||||
$installer->set_marcflavour_syspref('MARC21');
|
||||
$installer->set_indexing_engine(0);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=cut
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
=over 4
|
||||
|
||||
my $installer = C4::Installer->new();
|
||||
|
||||
=back
|
||||
my $installer = C4::Installer->new();
|
||||
|
||||
Creates a new installer.
|
||||
|
||||
|
|
@ -90,11 +80,7 @@ sub new {
|
|||
|
||||
=head2 marcflavour_list
|
||||
|
||||
=over 4
|
||||
|
||||
my ($marcflavours) = $installer->marcflavour_list($lang);
|
||||
|
||||
=back
|
||||
my ($marcflavours) = $installer->marcflavour_list($lang);
|
||||
|
||||
Return a arrayref of the MARC flavour sets available for the
|
||||
specified language C<$lang>. Returns 'undef' if a directory
|
||||
|
|
@ -115,11 +101,8 @@ sub marcflavour_list {
|
|||
|
||||
=head2 marc_framework_sql_list
|
||||
|
||||
=over 4
|
||||
|
||||
my ($defaulted_to_en, $list) = $installer->marc_framework_sql_list($lang, $marcflavour);
|
||||
|
||||
=back
|
||||
my ($defaulted_to_en, $list) =
|
||||
$installer->marc_framework_sql_list($lang, $marcflavour);
|
||||
|
||||
Returns in C<$list> a structure listing the filename, description, section,
|
||||
and mandatory/optional status of MARC framework scripts available for C<$lang>
|
||||
|
|
@ -200,11 +183,7 @@ sub marc_framework_sql_list {
|
|||
|
||||
=head2 sample_data_sql_list
|
||||
|
||||
=over 4
|
||||
|
||||
my ($defaulted_to_en, $list) = $installer->sample_data_sql_list($lang);
|
||||
|
||||
=back
|
||||
my ($defaulted_to_en, $list) = $installer->sample_data_sql_list($lang);
|
||||
|
||||
Returns in C<$list> a structure listing the filename, description, section,
|
||||
and mandatory/optional status of sample data scripts available for C<$lang>.
|
||||
|
|
@ -281,11 +260,7 @@ sub sample_data_sql_list {
|
|||
|
||||
=head2 sql_file_list
|
||||
|
||||
=over 4
|
||||
|
||||
my $list = $installer->sql_file_list($lang, $marcflavour, $subset_wanted);
|
||||
|
||||
=back
|
||||
my $list = $installer->sql_file_list($lang, $marcflavour, $subset_wanted);
|
||||
|
||||
Returns an arrayref containing the filepaths of installer SQL scripts
|
||||
available for laod. The C<$lang> and C<$marcflavour> arguments
|
||||
|
|
@ -320,11 +295,7 @@ sub sql_file_list {
|
|||
|
||||
=head2 load_db_schema
|
||||
|
||||
=over 4
|
||||
|
||||
my $error = $installer->load_db_schema();
|
||||
|
||||
=back
|
||||
my $error = $installer->load_db_schema();
|
||||
|
||||
Loads the SQL script that creates Koha's tables and indexes. The
|
||||
return value is a string containing error messages reported by the
|
||||
|
|
@ -343,11 +314,7 @@ sub load_db_schema {
|
|||
|
||||
=head2 load_sql_in_order
|
||||
|
||||
=over 4
|
||||
|
||||
my ($fwk_language, $list) = $installer->load_sql_in_order($all_languages, @sql_list);
|
||||
|
||||
=back
|
||||
my ($fwk_language, $list) = $installer->load_sql_in_order($all_languages, @sql_list);
|
||||
|
||||
Given a list of SQL scripts supplied in C<@sql_list>, loads each of them
|
||||
into the database and sets the FrameworksLoaded system preference to names
|
||||
|
|
@ -358,15 +325,15 @@ directory path). This means that dependencies among the scripts are to
|
|||
be resolved by carefully naming them, keeping in mind that the directory name
|
||||
does *not* currently count.
|
||||
|
||||
FIXME: this is a rather delicate way of dealing with dependencies between
|
||||
the install scripts.
|
||||
B<FIXME:> this is a rather delicate way of dealing with dependencies between
|
||||
the install scripts.
|
||||
|
||||
The return value C<$list> is an arrayref containing a hashref for each
|
||||
"level" or directory containing SQL scripts; the hashref in turns contains
|
||||
a list of hashrefs containing a list of each script load and any error
|
||||
messages associated with the loading of each script.
|
||||
|
||||
FIXME: The C<$fwk_language> code probably doesn't belong and needs to be
|
||||
B<FIXME:> The C<$fwk_language> code probably doesn't belong and needs to be
|
||||
moved to a different method.
|
||||
|
||||
=cut
|
||||
|
|
@ -433,11 +400,7 @@ sub load_sql_in_order {
|
|||
|
||||
=head2 set_marcflavour_syspref
|
||||
|
||||
=over 4
|
||||
|
||||
$installer->set_marcflavour_syspref($marcflavour);
|
||||
|
||||
=back
|
||||
$installer->set_marcflavour_syspref($marcflavour);
|
||||
|
||||
Set the 'marcflavour' system preference. The incoming
|
||||
C<$marcflavour> references to a subdirectory of
|
||||
|
|
@ -466,11 +429,7 @@ sub set_marcflavour_syspref {
|
|||
|
||||
=head2 set_indexing_engine
|
||||
|
||||
=over 4
|
||||
|
||||
$installer->set_indexing_engine($nozebra);
|
||||
|
||||
=back
|
||||
$installer->set_indexing_engine($nozebra);
|
||||
|
||||
Sets system preferences related to the indexing
|
||||
engine. The C<$nozebra> argument is a boolean;
|
||||
|
|
@ -495,11 +454,7 @@ sub set_indexing_engine {
|
|||
|
||||
=head2 set_version_syspref
|
||||
|
||||
=over 4
|
||||
|
||||
$installer->set_version_syspref();
|
||||
|
||||
=back
|
||||
$installer->set_version_syspref();
|
||||
|
||||
Set or update the 'Version' system preference to the current
|
||||
Koha software version.
|
||||
|
|
@ -526,24 +481,20 @@ sub set_version_syspref {
|
|||
|
||||
=head2 load_sql
|
||||
|
||||
=over 4
|
||||
|
||||
my $error = $installer->load_sql($filename);
|
||||
|
||||
=back
|
||||
my $error = $installer->load_sql($filename);
|
||||
|
||||
Runs a the specified SQL using the DB's command-line
|
||||
SQL tool, and returns any strings sent to STDERR
|
||||
by the command-line tool.
|
||||
|
||||
FIXME: there has been a long-standing desire to
|
||||
replace this with an SQL loader that goes
|
||||
through DBI; partly for portability issues
|
||||
and partly to improve error handling.
|
||||
B<FIXME:> there has been a long-standing desire to
|
||||
replace this with an SQL loader that goes
|
||||
through DBI; partly for portability issues
|
||||
and partly to improve error handling.
|
||||
|
||||
FIXME: even using the command-line loader, some more
|
||||
basic error handling should be added - deal
|
||||
with missing files, e.g.
|
||||
B<FIXME:> even using the command-line loader, some more
|
||||
basic error handling should be added - deal
|
||||
with missing files, e.g.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -582,11 +533,7 @@ sub load_sql {
|
|||
|
||||
=head2 get_file_path_from_name
|
||||
|
||||
=over 4
|
||||
|
||||
my $filename = $installer->get_file_path_from_name('script_name');
|
||||
|
||||
=back
|
||||
my $filename = $installer->get_file_path_from_name('script_name');
|
||||
|
||||
searches through the set of known SQL scripts and finds the fully
|
||||
qualified path name for the script that mathches the input.
|
||||
|
|
|
|||
|
|
@ -377,12 +377,20 @@ These are read-only accessors for the various attributes of a preference.
|
|||
|
||||
=head3 $pref->id
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $pref->branchcode
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $pref->categorycode
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $pref->item_type
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $pref->notification
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -90,16 +90,28 @@ These are read-only accessors for attributes of a C4::ItemType object.
|
|||
|
||||
=head3 $itemtype->itemtype
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $itemtype->description
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $itemtype->renewalsallowed
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $itemtype->rentalcharge
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $itemtype->notforloan
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $itemtype->imageurl
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $itemtype->summary
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ use C4::Languages;
|
|||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=cut
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=head2 getFrameworkLanguages
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ sub addalert ($$$) {
|
|||
parameters :
|
||||
- alertid : the alert id
|
||||
deletes the alert
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
sub delalert ($) {
|
||||
|
|
@ -552,9 +552,8 @@ sub parseletter {
|
|||
|
||||
=head2 EnqueueLetter
|
||||
|
||||
=over 4
|
||||
|
||||
my $success = EnqueueLetter( { letter => $letter, borrowernumber => '12', message_transport_type => 'email' } )
|
||||
my $success = EnqueueLetter( { letter => $letter,
|
||||
borrowernumber => '12', message_transport_type => 'email' } )
|
||||
|
||||
places a letter in the message_queue database table, which will
|
||||
eventually get processed (sent) by the process_message_queue.pl
|
||||
|
|
@ -562,8 +561,6 @@ cronjob when it calls SendQueuedMessages.
|
|||
|
||||
return true on success
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub EnqueueLetter ($) {
|
||||
|
|
@ -609,16 +606,12 @@ ENDSQL
|
|||
|
||||
=head2 SendQueuedMessages ([$hashref])
|
||||
|
||||
=over 4
|
||||
my $sent = SendQueuedMessages( { verbose => 1 } );
|
||||
|
||||
sends all of the 'pending' items in the message queue.
|
||||
|
||||
my $sent = SendQueuedMessages( { verbose => 1 } );
|
||||
|
||||
returns number of messages sent.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub SendQueuedMessages (;$) {
|
||||
|
|
@ -645,14 +638,10 @@ sub SendQueuedMessages (;$) {
|
|||
|
||||
=head2 GetRSSMessages
|
||||
|
||||
=over 4
|
||||
|
||||
my $message_list = GetRSSMessages( { limit => 10, borrowernumber => '14' } )
|
||||
my $message_list = GetRSSMessages( { limit => 10, borrowernumber => '14' } )
|
||||
|
||||
returns a listref of all queued RSS messages for a particular person.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub GetRSSMessages {
|
||||
|
|
@ -669,15 +658,11 @@ sub GetRSSMessages {
|
|||
|
||||
=head2 GetPrintMessages
|
||||
|
||||
=over 4
|
||||
|
||||
my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } )
|
||||
my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } )
|
||||
|
||||
Returns a arrayref of all queued print messages (optionally, for a particular
|
||||
person).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub GetPrintMessages {
|
||||
|
|
@ -689,17 +674,13 @@ sub GetPrintMessages {
|
|||
|
||||
=head2 GetQueuedMessages ([$hashref])
|
||||
|
||||
=over 4
|
||||
|
||||
my $messages = GetQueuedMessage( { borrowernumber => '123', limit => 20 } );
|
||||
my $messages = GetQueuedMessage( { borrowernumber => '123', limit => 20 } );
|
||||
|
||||
fetches messages out of the message queue.
|
||||
|
||||
returns:
|
||||
list of hashes, each has represents a message in the message queue.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub GetQueuedMessages {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ How to add a new message to the queue:
|
|||
my $borrower = { borrowernumber => 1 };
|
||||
my $item = C4::Items::GetItem(1);
|
||||
my $letter = C4::Letters::getletter('circulation', 'CHECKOUT');
|
||||
C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber});
|
||||
C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber});
|
||||
C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber});
|
||||
C4::Message->enqueue($letter, $borrower->{borrowernumber}, 'email');
|
||||
|
||||
|
|
@ -33,10 +33,11 @@ How to update a borrower's last checkout message:
|
|||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module presents an OO interface to the message_queue. Previously, you could
|
||||
only add messages to the message_queue via C<C4::Letters::EnqueueMessage()>. With
|
||||
this module, you can also get previously inserted messages, manipulate them, and
|
||||
save them back to the database.
|
||||
This module presents an OO interface to the message_queue. Previously,
|
||||
you could only add messages to the message_queue via
|
||||
C<C4::Letters::EnqueueMessage()>. With this module, you can also get
|
||||
previously inserted messages, manipulate them, and save them back to the
|
||||
database.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -302,26 +303,48 @@ sub append {
|
|||
|
||||
=head3 $message->message_id
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->borrowernumber
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->subject
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->content
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->metadata
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->letter_code
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->message_transport_type
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->status
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->time_queued
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->to_address
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->from_address
|
||||
|
||||
=cut
|
||||
|
||||
=head3 $message->content_type
|
||||
|
||||
=cut
|
||||
|
|
|
|||
12
C4/Print.pm
12
C4/Print.pm
|
|
@ -48,9 +48,7 @@ The functions in this module handle sending text to a printer.
|
|||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=over 2
|
||||
|
||||
=item remoteprint
|
||||
=head2 remoteprint
|
||||
|
||||
&remoteprint($items, $borrower);
|
||||
|
||||
|
|
@ -168,12 +166,12 @@ EOF
|
|||
return $slip;
|
||||
}
|
||||
|
||||
=item printslip
|
||||
=head2 printslip
|
||||
|
||||
&printslip($borrowernumber)
|
||||
|
||||
print a slip for the given $borrowernumber
|
||||
|
||||
print a slip for the given $borrowernumber
|
||||
|
||||
=cut
|
||||
|
||||
#'
|
||||
|
|
@ -193,8 +191,6 @@ END { } # module clean-up code here (global destructor)
|
|||
1;
|
||||
__END__
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Koha Development Team <info@koha.org>
|
||||
|
|
|
|||
176
C4/Reserves.pm
176
C4/Reserves.pm
|
|
@ -50,8 +50,8 @@ C4::Reserves - Koha functions for dealing with reservation.
|
|||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
this modules provides somes functions to deal with reservations.
|
||||
|
||||
This modules provides somes functions to deal with reservations.
|
||||
|
||||
Reserves are stored in reserves table.
|
||||
The following columns contains important values :
|
||||
- priority >0 : then the reserve is at 1st stage, and not yet affected to any item.
|
||||
|
|
@ -77,10 +77,8 @@ C4::Reserves - Koha functions for dealing with reservation.
|
|||
If transfer needed, write in branchtransfer P =0, F=NULL, I=filled
|
||||
The pickup library recieve the book, it checks it in P =0, F=W, I=filled
|
||||
The patron borrow the book P =0, F=F, I=filled
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=over 2
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -124,7 +122,7 @@ BEGIN {
|
|||
);
|
||||
}
|
||||
|
||||
=item AddReserve
|
||||
=head2 AddReserve
|
||||
|
||||
AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found)
|
||||
|
||||
|
|
@ -233,9 +231,9 @@ sub AddReserve {
|
|||
return; # FIXME: why not have a useful return value?
|
||||
}
|
||||
|
||||
=item GetReservesFromBiblionumber
|
||||
=head2 GetReservesFromBiblionumber
|
||||
|
||||
($count, $title_reserves) = &GetReserves($biblionumber);
|
||||
($count, $title_reserves) = &GetReserves($biblionumber);
|
||||
|
||||
This function gets the list of reservations for one C<$biblionumber>, returning a count
|
||||
of the reserves and an arrayref pointing to the reserves for C<$biblionumber>.
|
||||
|
|
@ -313,11 +311,11 @@ sub GetReservesFromBiblionumber {
|
|||
return ( $#results + 1, \@results );
|
||||
}
|
||||
|
||||
=item GetReservesFromItemnumber
|
||||
=head2 GetReservesFromItemnumber
|
||||
|
||||
( $reservedate, $borrowernumber, $branchcode ) = GetReservesFromItemnumber($itemnumber);
|
||||
|
||||
TODO :: Description here
|
||||
TODO :: Description here
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -338,12 +336,12 @@ sub GetReservesFromItemnumber {
|
|||
return ( $reservedate, $borrowernumber, $branchcode );
|
||||
}
|
||||
|
||||
=item GetReservesFromBorrowernumber
|
||||
=head2 GetReservesFromBorrowernumber
|
||||
|
||||
$borrowerreserv = GetReservesFromBorrowernumber($borrowernumber,$tatus);
|
||||
|
||||
TODO :: Descritpion
|
||||
|
||||
|
||||
TODO :: Descritpion
|
||||
|
||||
=cut
|
||||
|
||||
sub GetReservesFromBorrowernumber {
|
||||
|
|
@ -372,9 +370,9 @@ sub GetReservesFromBorrowernumber {
|
|||
return @$data;
|
||||
}
|
||||
#-------------------------------------------------------------------------------------
|
||||
=item CanBookBeReserved
|
||||
=head2 CanBookBeReserved
|
||||
|
||||
$error = &CanBookBeReserved($borrowernumber, $biblionumber)
|
||||
$error = &CanBookBeReserved($borrowernumber, $biblionumber)
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -453,11 +451,11 @@ sub CanBookBeReserved{
|
|||
|
||||
}
|
||||
|
||||
=item CanItemBeReserved
|
||||
=head2 CanItemBeReserved
|
||||
|
||||
$error = &CanItemBeReserved($borrowernumber, $itemnumber)
|
||||
$error = &CanItemBeReserved($borrowernumber, $itemnumber)
|
||||
|
||||
this function return 1 if an item can be issued by this borrower.
|
||||
This function return 1 if an item can be issued by this borrower.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -544,9 +542,9 @@ sub CanItemBeReserved{
|
|||
}
|
||||
}
|
||||
#--------------------------------------------------------------------------------
|
||||
=item GetReserveCount
|
||||
=head2 GetReserveCount
|
||||
|
||||
$number = &GetReserveCount($borrowernumber);
|
||||
$number = &GetReserveCount($borrowernumber);
|
||||
|
||||
this function returns the number of reservation for a borrower given on input arg.
|
||||
|
||||
|
|
@ -568,9 +566,9 @@ sub GetReserveCount {
|
|||
return $row->{counter};
|
||||
}
|
||||
|
||||
=item GetOtherReserves
|
||||
=head2 GetOtherReserves
|
||||
|
||||
($messages,$nextreservinfo)=$GetOtherReserves(itemnumber);
|
||||
($messages,$nextreservinfo)=$GetOtherReserves(itemnumber);
|
||||
|
||||
Check queued list of this document and check if this document must be transfered
|
||||
|
||||
|
|
@ -618,9 +616,9 @@ sub GetOtherReserves {
|
|||
return ( $messages, $nextreservinfo );
|
||||
}
|
||||
|
||||
=item GetReserveFee
|
||||
=head2 GetReserveFee
|
||||
|
||||
$fee = GetReserveFee($borrowernumber,$biblionumber,$constraint,$biblionumber);
|
||||
$fee = GetReserveFee($borrowernumber,$biblionumber,$constraint,$biblionumber);
|
||||
|
||||
Calculate the fee for a reserve
|
||||
|
||||
|
|
@ -721,9 +719,9 @@ sub GetReserveFee {
|
|||
return $fee;
|
||||
}
|
||||
|
||||
=item GetReservesToBranch
|
||||
=head2 GetReservesToBranch
|
||||
|
||||
@transreserv = GetReservesToBranch( $frombranch );
|
||||
@transreserv = GetReservesToBranch( $frombranch );
|
||||
|
||||
Get reserve list for a given branch
|
||||
|
||||
|
|
@ -748,9 +746,9 @@ sub GetReservesToBranch {
|
|||
return (@transreserv);
|
||||
}
|
||||
|
||||
=item GetReservesForBranch
|
||||
=head2 GetReservesForBranch
|
||||
|
||||
@transreserv = GetReservesForBranch($frombranch);
|
||||
@transreserv = GetReservesForBranch($frombranch);
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -793,7 +791,7 @@ sub GetReserveStatus {
|
|||
return $found;
|
||||
}
|
||||
|
||||
=item CheckReserves
|
||||
=head2 CheckReserves
|
||||
|
||||
($status, $reserve) = &CheckReserves($itemnumber);
|
||||
($status, $reserve) = &CheckReserves(undef, $barcode);
|
||||
|
|
@ -886,12 +884,12 @@ sub CheckReserves {
|
|||
}
|
||||
}
|
||||
|
||||
=item CancelExpiredReserves
|
||||
=head2 CancelExpiredReserves
|
||||
|
||||
CancelExpiredReserves();
|
||||
|
||||
Cancels all reserves with an expiration date from before today.
|
||||
|
||||
|
||||
Cancels all reserves with an expiration date from before today.
|
||||
|
||||
=cut
|
||||
|
||||
sub CancelExpiredReserves {
|
||||
|
|
@ -909,7 +907,7 @@ sub CancelExpiredReserves {
|
|||
|
||||
}
|
||||
|
||||
=item CancelReserve
|
||||
=head2 CancelReserve
|
||||
|
||||
&CancelReserve($biblionumber, $itemnumber, $borrowernumber);
|
||||
|
||||
|
|
@ -1011,13 +1009,9 @@ sub CancelReserve {
|
|||
}
|
||||
}
|
||||
|
||||
=item ModReserve
|
||||
=head2 ModReserve
|
||||
|
||||
=over 4
|
||||
|
||||
ModReserve($rank, $biblio, $borrower, $branch[, $itemnumber])
|
||||
|
||||
=back
|
||||
ModReserve($rank, $biblio, $borrower, $branch[, $itemnumber])
|
||||
|
||||
Change a hold request's priority or cancel it.
|
||||
|
||||
|
|
@ -1039,7 +1033,7 @@ C<$rank> is a non-zero integer; if supplied, the itemnumber
|
|||
of the hold request is set accordingly; if omitted, the itemnumber
|
||||
is cleared.
|
||||
|
||||
FIXME: Note that the forgoing can have the effect of causing
|
||||
B<FIXME:> Note that the forgoing can have the effect of causing
|
||||
item-level hold requests to turn into title-level requests. This
|
||||
will be fixed once reserves has separate columns for requested
|
||||
itemnumber and supplying itemnumber.
|
||||
|
|
@ -1093,7 +1087,7 @@ sub ModReserve {
|
|||
}
|
||||
}
|
||||
|
||||
=item ModReserveFill
|
||||
=head2 ModReserveFill
|
||||
|
||||
&ModReserveFill($reserve);
|
||||
|
||||
|
|
@ -1161,9 +1155,9 @@ sub ModReserveFill {
|
|||
}
|
||||
}
|
||||
|
||||
=item ModReserveStatus
|
||||
=head2 ModReserveStatus
|
||||
|
||||
&ModReserveStatus($itemnumber, $newstatus);
|
||||
&ModReserveStatus($itemnumber, $newstatus);
|
||||
|
||||
Update the reserve status for the active (priority=0) reserve.
|
||||
|
||||
|
|
@ -1192,9 +1186,9 @@ sub ModReserveStatus {
|
|||
}
|
||||
}
|
||||
|
||||
=item ModReserveAffect
|
||||
=head2 ModReserveAffect
|
||||
|
||||
&ModReserveAffect($itemnumber,$borrowernumber,$diffBranchSend);
|
||||
&ModReserveAffect($itemnumber,$borrowernumber,$diffBranchSend);
|
||||
|
||||
This function affect an item and a status for a given reserve
|
||||
The itemnumber parameter is used to find the biblionumber.
|
||||
|
|
@ -1204,6 +1198,7 @@ to the correct reserve.
|
|||
if $transferToDo is not set, then the status is set to "Waiting" as well.
|
||||
otherwise, a transfer is on the way, and the end of the transfer will
|
||||
take care of the waiting status
|
||||
|
||||
=cut
|
||||
|
||||
sub ModReserveAffect {
|
||||
|
|
@ -1255,11 +1250,11 @@ sub ModReserveAffect {
|
|||
return;
|
||||
}
|
||||
|
||||
=item ModReserveCancelAll
|
||||
=head2 ModReserveCancelAll
|
||||
|
||||
($messages,$nextreservinfo) = &ModReserveCancelAll($itemnumber,$borrowernumber);
|
||||
($messages,$nextreservinfo) = &ModReserveCancelAll($itemnumber,$borrowernumber);
|
||||
|
||||
function to cancel reserv,check other reserves, and transfer document if it's necessary
|
||||
function to cancel reserv,check other reserves, and transfer document if it's necessary
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1277,9 +1272,9 @@ sub ModReserveCancelAll {
|
|||
return ( $messages, $nextreservinfo );
|
||||
}
|
||||
|
||||
=item ModReserveMinusPriority
|
||||
=head2 ModReserveMinusPriority
|
||||
|
||||
&ModReserveMinusPriority($itemnumber,$borrowernumber,$biblionumber)
|
||||
&ModReserveMinusPriority($itemnumber,$borrowernumber,$biblionumber)
|
||||
|
||||
Reduce the values of queuded list
|
||||
|
||||
|
|
@ -1302,12 +1297,13 @@ sub ModReserveMinusPriority {
|
|||
_FixPriority($biblionumber, $borrowernumber, '0');
|
||||
}
|
||||
|
||||
=item GetReserveInfo
|
||||
=head2 GetReserveInfo
|
||||
|
||||
&GetReserveInfo($borrowernumber,$biblionumber);
|
||||
&GetReserveInfo($borrowernumber,$biblionumber);
|
||||
|
||||
Get item and borrower details for a current hold.
|
||||
Current implementation this query should have a single result.
|
||||
|
||||
Get item and borrower details for a current hold.
|
||||
Current implementation this query should have a single result.
|
||||
=cut
|
||||
|
||||
sub GetReserveInfo {
|
||||
|
|
@ -1356,13 +1352,9 @@ sub GetReserveInfo {
|
|||
|
||||
}
|
||||
|
||||
=item IsAvailableForItemLevelRequest
|
||||
=head2 IsAvailableForItemLevelRequest
|
||||
|
||||
=over 4
|
||||
|
||||
my $is_available = IsAvailableForItemLevelRequest($itemnumber);
|
||||
|
||||
=back
|
||||
my $is_available = IsAvailableForItemLevelRequest($itemnumber);
|
||||
|
||||
Checks whether a given item record is available for an
|
||||
item-level hold request. An item is available if
|
||||
|
|
@ -1432,13 +1424,15 @@ sub IsAvailableForItemLevelRequest {
|
|||
}
|
||||
}
|
||||
|
||||
=item AlterPriority
|
||||
AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate );
|
||||
=head2 AlterPriority
|
||||
|
||||
AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate );
|
||||
|
||||
This function changes a reserve's priority up, down, to the top, or to the bottom.
|
||||
Input: $where is 'up', 'down', 'top' or 'bottom'. Biblionumber, Date reserve was placed
|
||||
|
||||
=cut
|
||||
|
||||
sub AlterPriority {
|
||||
my ( $where, $borrowernumber, $biblionumber ) = @_;
|
||||
|
||||
|
|
@ -1467,10 +1461,12 @@ sub AlterPriority {
|
|||
}
|
||||
}
|
||||
|
||||
=item ToggleLowestPriority
|
||||
ToggleLowestPriority( $borrowernumber, $biblionumber );
|
||||
=head2 ToggleLowestPriority
|
||||
|
||||
ToggleLowestPriority( $borrowernumber, $biblionumber );
|
||||
|
||||
This function sets the lowestPriority field to true if is false, and false if it is true.
|
||||
|
||||
=cut
|
||||
|
||||
sub ToggleLowestPriority {
|
||||
|
|
@ -1492,16 +1488,16 @@ sub ToggleLowestPriority {
|
|||
_FixPriority( $biblionumber, $borrowernumber, '999999' );
|
||||
}
|
||||
|
||||
=item _FixPriority
|
||||
=head2 _FixPriority
|
||||
|
||||
&_FixPriority($biblio,$borrowernumber,$rank,$ignoreSetLowestRank);
|
||||
&_FixPriority($biblio,$borrowernumber,$rank,$ignoreSetLowestRank);
|
||||
|
||||
Only used internally (so don't export it)
|
||||
Changed how this functions works #
|
||||
Now just gets an array of reserves in the rank order and updates them with
|
||||
the array index (+1 as array starts from 0)
|
||||
and if $rank is supplied will splice item from the array and splice it back in again
|
||||
in new priority rank
|
||||
Only used internally (so don't export it)
|
||||
Changed how this functions works #
|
||||
Now just gets an array of reserves in the rank order and updates them with
|
||||
the array index (+1 as array starts from 0)
|
||||
and if $rank is supplied will splice item from the array and splice it back in again
|
||||
in new priority rank
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1593,7 +1589,7 @@ sub _FixPriority {
|
|||
}
|
||||
}
|
||||
|
||||
=item _Findgroupreserve
|
||||
=head2 _Findgroupreserve
|
||||
|
||||
@results = &_Findgroupreserve($biblioitemnumber, $biblionumber, $itemnumber);
|
||||
|
||||
|
|
@ -1706,13 +1702,9 @@ sub _Findgroupreserve {
|
|||
return @results;
|
||||
}
|
||||
|
||||
=item _koha_notify_reserve
|
||||
=head2 _koha_notify_reserve
|
||||
|
||||
=over 4
|
||||
|
||||
_koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber );
|
||||
|
||||
=back
|
||||
_koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber );
|
||||
|
||||
Sends a notification to the patron that their hold has been filled (through
|
||||
ModReserveAffect, _not_ ModReserveFill)
|
||||
|
|
@ -1796,25 +1788,21 @@ sub _koha_notify_reserve {
|
|||
}
|
||||
}
|
||||
|
||||
=item _ShiftPriorityByDateAndPriority
|
||||
=head2 _ShiftPriorityByDateAndPriority
|
||||
|
||||
=over 4
|
||||
|
||||
$new_priority = _ShiftPriorityByDateAndPriority( $biblionumber, $reservedate, $priority );
|
||||
|
||||
=back
|
||||
$new_priority = _ShiftPriorityByDateAndPriority( $biblionumber, $reservedate, $priority );
|
||||
|
||||
This increments the priority of all reserves after the one
|
||||
with either the lowest date after C<$reservedate>
|
||||
or the lowest priority after C<$priority>.
|
||||
with either the lowest date after C<$reservedate>
|
||||
or the lowest priority after C<$priority>.
|
||||
|
||||
It effectively makes room for a new reserve to be inserted with a certain
|
||||
priority, which is returned.
|
||||
priority, which is returned.
|
||||
|
||||
This is most useful when the reservedate can be set by the user. It allows
|
||||
the new reserve to be placed before other reserves that have a later
|
||||
reservedate. Since priority also is set by the form in reserves/request.pl
|
||||
the sub accounts for that too.
|
||||
the new reserve to be placed before other reserves that have a later
|
||||
reservedate. Since priority also is set by the form in reserves/request.pl
|
||||
the sub accounts for that too.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1849,8 +1837,6 @@ sub _ShiftPriorityByDateAndPriority {
|
|||
return $new_priority; # so the caller knows what priority they wind up receiving
|
||||
}
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Koha Development Team <info@koha.org>
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ C4::RotatingCollections - Functions for managing rotating collections
|
|||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=over 2
|
||||
|
||||
=cut
|
||||
|
||||
@ISA = qw( Exporter );
|
||||
|
|
@ -67,7 +65,7 @@ C4::RotatingCollections - Functions for managing rotating collections
|
|||
GetCollectionItemBranches
|
||||
);
|
||||
|
||||
=item CreateCollection
|
||||
=head2 CreateCollection
|
||||
( $success, $errorcode, $errormessage ) = CreateCollection( $title, $description );
|
||||
Creates a new collection
|
||||
|
||||
|
|
@ -79,7 +77,9 @@ C4::RotatingCollections - Functions for managing rotating collections
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub CreateCollection {
|
||||
my ( $title, $description ) = @_;
|
||||
|
||||
|
|
@ -102,12 +102,14 @@ sub CreateCollection {
|
|||
$sth->finish;
|
||||
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
=item UpdateCollection
|
||||
=head2 UpdateCollection
|
||||
|
||||
( $success, $errorcode, $errormessage ) = UpdateCollection( $colId, $title, $description );
|
||||
Updates a collection
|
||||
|
||||
Updates a collection
|
||||
|
||||
Input:
|
||||
$colId: id of the collection to be updated
|
||||
|
|
@ -118,7 +120,9 @@ sub CreateCollection {
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub UpdateCollection {
|
||||
my ( $colId, $title, $description ) = @_;
|
||||
|
||||
|
|
@ -147,7 +151,8 @@ sub UpdateCollection {
|
|||
|
||||
}
|
||||
|
||||
=item DeleteCollection
|
||||
=head2 DeleteCollection
|
||||
|
||||
( $success, $errorcode, $errormessage ) = DeleteCollection( $colId );
|
||||
Deletes a collection of the given id
|
||||
|
||||
|
|
@ -158,7 +163,9 @@ sub UpdateCollection {
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub DeleteCollection {
|
||||
my ( $colId ) = @_;
|
||||
|
||||
|
|
@ -178,7 +185,8 @@ sub DeleteCollection {
|
|||
return 1;
|
||||
}
|
||||
|
||||
=item GetCollections
|
||||
=head2 GetCollections
|
||||
|
||||
$collections = GetCollections();
|
||||
Returns data about all collections
|
||||
|
||||
|
|
@ -188,7 +196,9 @@ sub DeleteCollection {
|
|||
On Failure:
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub GetCollections {
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
|
@ -206,8 +216,10 @@ sub GetCollections {
|
|||
return \@results;
|
||||
}
|
||||
|
||||
=item GetItemsInCollection
|
||||
=head2 GetItemsInCollection
|
||||
|
||||
( $results, $success, $errorcode, $errormessage ) = GetItemsInCollection( $colId );
|
||||
|
||||
Returns information about the items in the given collection
|
||||
|
||||
Input:
|
||||
|
|
@ -218,7 +230,9 @@ sub GetCollections {
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub GetItemsInCollection {
|
||||
my ( $colId ) = @_;
|
||||
|
||||
|
|
@ -250,15 +264,19 @@ sub GetItemsInCollection {
|
|||
return \@results;
|
||||
}
|
||||
|
||||
=item GetCollection
|
||||
=head2 GetCollection
|
||||
|
||||
( $colId, $colTitle, $colDesc, $colBranchcode ) = GetCollection( $colId );
|
||||
Returns information about a collection
|
||||
|
||||
Returns information about a collection
|
||||
|
||||
Input:
|
||||
$colId: Id of the collection
|
||||
Output:
|
||||
$colId, $colTitle, $colDesc, $colBranchcode
|
||||
|
||||
=cut
|
||||
|
||||
sub GetCollection {
|
||||
my ( $colId ) = @_;
|
||||
|
||||
|
|
@ -281,9 +299,11 @@ sub GetCollection {
|
|||
|
||||
}
|
||||
|
||||
=item AddItemToCollection
|
||||
=head2 AddItemToCollection
|
||||
|
||||
( $success, $errorcode, $errormessage ) = AddItemToCollection( $colId, $itemnumber );
|
||||
Adds an item to a rotating collection.
|
||||
|
||||
Adds an item to a rotating collection.
|
||||
|
||||
Input:
|
||||
$colId: Collection to add the item to.
|
||||
|
|
@ -292,7 +312,9 @@ sub GetCollection {
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub AddItemToCollection {
|
||||
my ( $colId, $itemnumber ) = @_;
|
||||
|
||||
|
|
@ -322,9 +344,11 @@ sub AddItemToCollection {
|
|||
|
||||
}
|
||||
|
||||
=item RemoveItemFromCollection
|
||||
=head2 RemoveItemFromCollection
|
||||
|
||||
( $success, $errorcode, $errormessage ) = RemoveItemFromCollection( $colId, $itemnumber );
|
||||
Removes an item to a collection
|
||||
|
||||
Removes an item to a collection
|
||||
|
||||
Input:
|
||||
$colId: Collection to add the item to.
|
||||
|
|
@ -334,7 +358,9 @@ sub AddItemToCollection {
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub RemoveItemFromCollection {
|
||||
my ( $colId, $itemnumber ) = @_;
|
||||
|
||||
|
|
@ -358,9 +384,11 @@ sub RemoveItemFromCollection {
|
|||
return 1;
|
||||
}
|
||||
|
||||
=item TransferCollection
|
||||
=head2 TransferCollection
|
||||
|
||||
( $success, $errorcode, $errormessage ) = TransferCollection( $colId, $colBranchcode );
|
||||
Transfers a collection to another branch
|
||||
|
||||
Transfers a collection to another branch
|
||||
|
||||
Input:
|
||||
$colId: id of the collection to be updated
|
||||
|
|
@ -370,7 +398,9 @@ sub RemoveItemFromCollection {
|
|||
$success: 1 if all database operations were successful, 0 otherwise
|
||||
$errorCode: Code for reason of failure, good for translating errors in templates
|
||||
$errorMessage: English description of error
|
||||
|
||||
=cut
|
||||
|
||||
sub TransferCollection {
|
||||
my ( $colId, $colBranchcode ) = @_;
|
||||
|
||||
|
|
@ -407,9 +437,12 @@ sub TransferCollection {
|
|||
|
||||
}
|
||||
|
||||
=item GetCollectionItemBranches
|
||||
my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
|
||||
=head2 GetCollectionItemBranches
|
||||
|
||||
my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
|
||||
|
||||
=cut
|
||||
|
||||
sub GetCollectionItemBranches {
|
||||
my ( $itemnumber ) = @_;
|
||||
|
||||
|
|
@ -436,9 +469,12 @@ sub GetCollectionItemBranches {
|
|||
);
|
||||
}
|
||||
|
||||
=item isItemInThisCollection
|
||||
$inCollection = isItemInThisCollection( $itemnumber, $colId );
|
||||
=cut
|
||||
=head2 isItemInThisCollection
|
||||
|
||||
$inCollection = isItemInThisCollection( $itemnumber, $colId );
|
||||
|
||||
=cut
|
||||
|
||||
sub isItemInThisCollection {
|
||||
my ( $itemnumber, $colId ) = @_;
|
||||
|
||||
|
|
@ -452,9 +488,12 @@ sub isItemInThisCollection {
|
|||
return $$row{'inCollection'};
|
||||
}
|
||||
|
||||
=item isItemInAnyCollection
|
||||
=head2 isItemInAnyCollection
|
||||
|
||||
$inCollection = isItemInAnyCollection( $itemnumber );
|
||||
|
||||
=cut
|
||||
|
||||
sub isItemInAnyCollection {
|
||||
my ( $itemnumber ) = @_;
|
||||
|
||||
|
|
@ -479,8 +518,6 @@ sub isItemInAnyCollection {
|
|||
|
||||
__END__
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Kyle Hall <kylemhall@gmail.com>
|
||||
|
|
|
|||
|
|
@ -60,18 +60,11 @@ This module contains routines for adding, modifying and Searching Data in MysqlD
|
|||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=over 2
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 SearchInTable
|
||||
|
||||
=over 4
|
||||
$hashref = &SearchInTable($tablename,$data, $orderby, $limit,
|
||||
$columns_out, $filtercolumns, $searchtype);
|
||||
|
||||
$hashref = &SearchInTable($tablename,$data, $orderby, $limit, $columns_out, $filtercolumns, $searchtype);
|
||||
|
||||
=back
|
||||
|
||||
$tablename Name of the table (string)
|
||||
|
||||
|
|
@ -137,14 +130,10 @@ sub SearchInTable{
|
|||
|
||||
=head2 InsertInTable
|
||||
|
||||
=over 4
|
||||
|
||||
$data_id_in_table = &InsertInTable($tablename,$data_hashref,$withprimarykeys);
|
||||
|
||||
=back
|
||||
Insert Data in table and returns the id of the row inserted
|
||||
|
||||
Insert Data in table
|
||||
and returns the id of the row inserted
|
||||
=cut
|
||||
|
||||
sub InsertInTable{
|
||||
|
|
@ -163,14 +152,10 @@ sub InsertInTable{
|
|||
|
||||
=head2 UpdateInTable
|
||||
|
||||
=over 4
|
||||
|
||||
$status = &UpdateInTable($tablename,$data_hashref);
|
||||
|
||||
=back
|
||||
Update Data in table and returns the status of the operation
|
||||
|
||||
Update Data in table
|
||||
and returns the status of the operation
|
||||
=cut
|
||||
|
||||
sub UpdateInTable{
|
||||
|
|
@ -194,14 +179,10 @@ sub UpdateInTable{
|
|||
|
||||
=head2 DeleteInTable
|
||||
|
||||
=over 4
|
||||
|
||||
$status = &DeleteInTable($tablename,$data_hashref);
|
||||
|
||||
=back
|
||||
Delete Data in table and returns the status of the operation
|
||||
|
||||
Delete Data in table
|
||||
and returns the status of the operation
|
||||
=cut
|
||||
|
||||
sub DeleteInTable{
|
||||
|
|
@ -223,13 +204,10 @@ sub DeleteInTable{
|
|||
|
||||
=head2 GetPrimaryKeys
|
||||
|
||||
=over 4
|
||||
|
||||
@primarykeys = &GetPrimaryKeys($tablename)
|
||||
|
||||
=back
|
||||
Get the Primary Key field names of the table
|
||||
|
||||
Get the Primary Key field names of the table
|
||||
=cut
|
||||
|
||||
sub GetPrimaryKeys($) {
|
||||
|
|
@ -240,11 +218,7 @@ sub GetPrimaryKeys($) {
|
|||
|
||||
=head2 _get_columns
|
||||
|
||||
=over 4
|
||||
|
||||
_get_columns($tablename)
|
||||
|
||||
=back
|
||||
_get_columns($tablename)
|
||||
|
||||
Given a tablename
|
||||
Returns a hashref of all the fieldnames of the table
|
||||
|
|
@ -265,11 +239,7 @@ sub _get_columns($) {
|
|||
|
||||
=head2 _filter_columns
|
||||
|
||||
=over 4
|
||||
|
||||
_filter_columns($tablename,$research, $filtercolumns)
|
||||
|
||||
=back
|
||||
_filter_columns($tablename,$research, $filtercolumns)
|
||||
|
||||
Given
|
||||
- a tablename
|
||||
|
|
@ -298,11 +268,7 @@ sub _filter_columns ($$;$) {
|
|||
}
|
||||
=head2 _filter_fields
|
||||
|
||||
=over 4
|
||||
|
||||
_filter_fields
|
||||
|
||||
=back
|
||||
_filter_fields
|
||||
|
||||
Given
|
||||
- a tablename
|
||||
|
|
|
|||
|
|
@ -43,14 +43,11 @@ C4::Scheduler - Module for running jobs with the unix at command
|
|||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=cut
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=over 2
|
||||
|
||||
=cut
|
||||
|
||||
=item get_jobs();
|
||||
=head2 get_jobs();
|
||||
|
||||
This will return all scheduled jobs
|
||||
|
||||
|
|
@ -62,7 +59,7 @@ sub get_jobs {
|
|||
return ($jobs);
|
||||
}
|
||||
|
||||
=item get_at_jobs();
|
||||
=head2 get_at_jobs();
|
||||
|
||||
This will return all At scheduled jobs
|
||||
|
||||
|
|
@ -73,7 +70,7 @@ sub get_at_jobs {
|
|||
return (\%jobs);
|
||||
}
|
||||
|
||||
=item get_at_job($id)
|
||||
=head2 get_at_job($id)
|
||||
|
||||
This will return the At job with the given id
|
||||
|
||||
|
|
@ -84,7 +81,7 @@ sub get_at_job {
|
|||
my %jobs = Schedule::At::getJobs(JOBID => $id);
|
||||
}
|
||||
|
||||
=item add_at_job ($time,$command)
|
||||
=head2 add_at_job ($time,$command)
|
||||
|
||||
Given a timestamp and a command this will schedule the job to run at that time.
|
||||
|
||||
|
|
@ -137,13 +134,11 @@ sub remove_at_job {
|
|||
1;
|
||||
__END__
|
||||
|
||||
=back
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
At some point C<C4::Scheduler> should be refactored:
|
||||
|
||||
=over 4
|
||||
=over
|
||||
|
||||
=item At and C<Schedule::At> does not work on Win32.
|
||||
|
||||
|
|
|
|||
|
|
@ -73,11 +73,7 @@ More verbose debugging messages are sent in the presence of non-zero $ENV{"DEBUG
|
|||
The default is to scrub everything, leaving no markup at all. This is compatible with the expectations
|
||||
for Tags.
|
||||
|
||||
=head2
|
||||
|
||||
=head3 TO DO: Add real perldoc
|
||||
|
||||
=head2
|
||||
=head2 TODO: Add real perldoc
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -59,11 +59,7 @@ our ( $query, $cookie );
|
|||
|
||||
=head2 init
|
||||
|
||||
=over 4
|
||||
|
||||
our ( $query, $response ) = C4::Service->init( %needed_flags );
|
||||
|
||||
=back
|
||||
our ( $query, $response ) = C4::Service->init( %needed_flags );
|
||||
|
||||
Initialize the service and check for the permissions in C<%needed_flags>.
|
||||
|
||||
|
|
@ -92,12 +88,8 @@ sub init {
|
|||
|
||||
=head2 return_error
|
||||
|
||||
=over 4
|
||||
|
||||
C4::Service->return_error( $type, $error, %flags );
|
||||
|
||||
=back
|
||||
|
||||
Exit the script with HTTP status 400, and return a JSON error object.
|
||||
|
||||
C<$type> should be a short, lower case code for the generic type of error (such
|
||||
|
|
@ -127,22 +119,14 @@ sub return_error {
|
|||
|
||||
=head2 return_multi
|
||||
|
||||
=over 4
|
||||
|
||||
C4::Service->return_multi( \@responses, %flags );
|
||||
|
||||
=back
|
||||
C4::Service->return_multi( \@responses, %flags );
|
||||
|
||||
return_multi is similar to return_success or return_error, but allows you to
|
||||
return different statuses for several requests sent at once (using HTTP status
|
||||
"207 Multi-Status", much like WebDAV). The toplevel hashref (turned into the
|
||||
JSON response) looks something like this:
|
||||
|
||||
=over 4
|
||||
|
||||
{ multi => JSON::true, responses => \@responses, %flags }
|
||||
|
||||
=back
|
||||
{ multi => JSON::true, responses => \@responses, %flags }
|
||||
|
||||
Each element of @responses should be either a plain hashref or an arrayref. If
|
||||
it is a hashref, it is sent to the browser as-is. If it is an arrayref, it is
|
||||
|
|
@ -183,12 +167,8 @@ sub return_multi {
|
|||
|
||||
=head2 return_success
|
||||
|
||||
=over 4
|
||||
|
||||
C4::Service->return_success( $response );
|
||||
|
||||
=back
|
||||
|
||||
Print out the information in the C<C4::Output::JSONStream> C<$response>, then
|
||||
exit with HTTP status 200.
|
||||
|
||||
|
|
@ -202,12 +182,8 @@ sub return_success {
|
|||
|
||||
=head2 require_params
|
||||
|
||||
=over 4
|
||||
|
||||
my @values = C4::Service->require_params( @params );
|
||||
|
||||
=back
|
||||
|
||||
Check that each of of the parameters specified in @params was sent in the
|
||||
request, then return their values in that order.
|
||||
|
||||
|
|
@ -230,14 +206,10 @@ sub require_params {
|
|||
|
||||
=head2 dispatch
|
||||
|
||||
=over 4
|
||||
|
||||
C4::Service->dispatch(
|
||||
[ $path_regex, \@required_params, \&handler ],
|
||||
...
|
||||
);
|
||||
|
||||
=back
|
||||
C4::Service->dispatch(
|
||||
[ $path_regex, \@required_params, \&handler ],
|
||||
...
|
||||
);
|
||||
|
||||
dispatch takes several array-refs, each one describing a 'route', to use the
|
||||
Rails terminology.
|
||||
|
|
|
|||
Loading…
Reference in New Issue