=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
=head1 SYNOPSIS
-use C4::Charset;
+ use C4::Charset;
=head1 DESCRIPTION
=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 *
=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
=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{
=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
=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
=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
=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
=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
=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
=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
=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
=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.,
=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.
=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.
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.
=head2 decode
-=head3 $str = &decode($chunk);
-
-=over 4
+ $str = &decode($chunk);
-=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 {
=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.
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>
=back
+=back
+
=cut
sub transferbook {
=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.
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 :
=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
=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
=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.
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 {
=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.
=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.
=head2 AddReturn
-($doreturn, $messages, $iteminformation, $borrower) =
- &AddReturn($barcode, $branch, $exemptfine, $dropbox);
+ ($doreturn, $messages, $iteminformation, $borrower) =
+ &AddReturn($barcode, $branch, $exemptfine, $dropbox);
Returns a book.
=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
=head2 _FixOverduesOnReturn
- &_FixOverduesOnReturn($brn,$itm, $exemptfine, $dropboxmode);
+ &_FixOverduesOnReturn($brn,$itm, $exemptfine, $dropboxmode);
C<$brn> borrowernumber
=head2 _FixAccountForLostAndReturned
- &_FixAccountForLostAndReturned($itemnumber, [$borrowernumber, $barcode]);
+ &_FixAccountForLostAndReturned($itemnumber, [$borrowernumber, $barcode]);
Calculates the charge for a book lost and returned.
=head2 GetItemIssue
-$issue = &GetItemIssue($itemnumber);
+ $issue = &GetItemIssue($itemnumber);
Returns patron currently having a book, or undef if not checked out.
=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
=head2 GetItemIssues
-$issues = &GetItemIssues($itemnumber, $history);
+ $issues = &GetItemIssues($itemnumber, $history);
Returns patrons that have issued a book
=head2 GetBiblioIssues
-$issues = GetBiblioIssues($biblionumber);
+ $issues = GetBiblioIssues($biblionumber);
this function get all issues from a biblionumber.
=head2 GetUpcomingDueIssues
-=over 4
-
-my $upcoming_dues = GetUpcomingDueIssues( { days_in_advance => 4 } );
-
-=back
+ my $upcoming_dues = GetUpcomingDueIssues( { days_in_advance => 4 } );
=cut
=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.
=head2 AddRenewal
-&AddRenewal($borrowernumber, $itemnumber, $branch, [$datedue], [$lastreneweddate]);
+ &AddRenewal($borrowernumber, $itemnumber, $branch, [$datedue], [$lastreneweddate]);
Renews a loan.
=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.
=head2 AddIssuingCharge
-&AddIssuingCharge( $itemno, $borrowernumber, $charge )
+ &AddIssuingCharge( $itemno, $borrowernumber, $charge )
=cut
=head2 GetTransfers
-GetTransfers($itemnumber);
+ GetTransfers($itemnumber);
=cut
=head2 GetTransfersFromTo
-@results = GetTransfersFromTo($frombranch,$tobranch);
+ @results = GetTransfersFromTo($frombranch,$tobranch);
Returns the list of pending transfers between $from and $to branch
=head2 DeleteTransfer
-&DeleteTransfer($itemnumber);
+ &DeleteTransfer($itemnumber);
=cut
=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>.
=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
=head2 UpdateHoldingbranch
-$items = UpdateHoldingbranch($branch,$itmenumber);
+ $items = UpdateHoldingbranch($branch,$itmenumber);
+
Simple methode for updating hodlingbranch in items BDD line
=cut
}
=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 {
=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
=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
=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
=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
=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.
=head2 DeleteBranchTransferLimits
-DeleteBranchTransferLimits();
+ DeleteBranchTransferLimits();
=cut
=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
=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.
=head2 display_form
-=over 4
-
-my $display = $heading->display_form();
-
-=back
+ my $display = $heading->display_form();
Return the "canonical" display form of the heading.
=head2 authorities
-=over 4
-
-my $authorities = $heading->authorities;
-
-=back
+ my $authorities = $heading->authorities;
Return a list of authority records for this
heading.
=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.
=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,
=head2 GetImportRecordMarc
-=over 4
-
-my ($marcblob, $encoding) = GetImportRecordMarc($import_record_id);
-
-=back
+ my ($marcblob, $encoding) = GetImportRecordMarc($import_record_id);
=cut
=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
=head2 GetImportBatch
-=over 4
-
-my $row = GetImportBatch($batch_id);
-
-=back
+ my $row = GetImportBatch($batch_id);
Retrieve a hashref of an import_batches row.
=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
=head2 ModBiblioInBatch
-=over 4
-
-ModBiblioInBatch($import_record_id, $marc_record);
-
-=back
+ ModBiblioInBatch($import_record_id, $marc_record);
=cut
=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 {
=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
=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
=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
=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
=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
=head2 BatchRevertItems
-=over 4
-
-my $num_items_deleted = BatchRevertItems($import_record_id, $biblionumber);
-
-=back
+ my $num_items_deleted = BatchRevertItems($import_record_id, $biblionumber);
=cut
=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
=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
=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)
=head2 GetItemNumbersFromImportBatch
+ my @itemsnos = GetItemNumbersFromImportBatch($batch_id);
+
=cut
sub GetItemNumbersFromImportBatch {
=head2 GetNumberOfImportBatches
-=over 4
-
-my $count = GetNumberOfImportBatches();
-
-=back
+ my $count = GetNumberOfImportBatches();
=cut
=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
=head2 GetBestRecordMatch
-=over 4
-
-my $record_id = GetBestRecordMatch($import_record_id);
-
-=back
+ my $record_id = GetBestRecordMatch($import_record_id);
=cut
=head2 GetImportBatchStatus
-=over 4
-
-my $status = GetImportBatchStatus($batch_id);
-
-=back
+ my $status = GetImportBatchStatus($batch_id);
=cut
=head2 SetImportBatchStatus
-=over 4
-
-SetImportBatchStatus($batch_id, $new_status);
-
-=back
+ SetImportBatchStatus($batch_id, $new_status);
=cut
=head2 GetImportBatchOverlayAction
-=over 4
-
-my $overlay_action = GetImportBatchOverlayAction($batch_id);
-
-=back
+ my $overlay_action = GetImportBatchOverlayAction($batch_id);
=cut
=head2 SetImportBatchOverlayAction
-=over 4
-
-SetImportBatchOverlayAction($batch_id, $new_overlay_action);
-
-=back
+ SetImportBatchOverlayAction($batch_id, $new_overlay_action);
=cut
=head2 GetImportBatchNoMatchAction
-=over 4
-
-my $nomatch_action = GetImportBatchNoMatchAction($batch_id);
-
-=back
+ my $nomatch_action = GetImportBatchNoMatchAction($batch_id);
=cut
=head2 SetImportBatchNoMatchAction
-=over 4
-
-SetImportBatchNoMatchAction($batch_id, $new_nomatch_action);
-
-=back
+ SetImportBatchNoMatchAction($batch_id, $new_nomatch_action);
=cut
=head2 GetImportBatchItemAction
-=over 4
-
-my $item_action = GetImportBatchItemAction($batch_id);
-
-=back
+ my $item_action = GetImportBatchItemAction($batch_id);
=cut
=head2 SetImportBatchItemAction
-=over 4
-
-SetImportBatchItemAction($batch_id, $new_item_action);
-
-=back
+ SetImportBatchItemAction($batch_id, $new_item_action);
=cut
=head2 GetImportBatchMatcher
-=over 4
-
-my $matcher_id = GetImportBatchMatcher($batch_id);
-
-=back
+ my $matcher_id = GetImportBatchMatcher($batch_id);
=cut
=head2 SetImportBatchMatcher
-=over 4
-
-SetImportBatchMatcher($batch_id, $new_matcher_id);
-
-=back
+ SetImportBatchMatcher($batch_id, $new_matcher_id);
=cut
=head2 GetImportRecordOverlayStatus
-=over 4
-
-my $overlay_status = GetImportRecordOverlayStatus($import_record_id);
-
-=back
+ my $overlay_status = GetImportRecordOverlayStatus($import_record_id);
=cut
=head2 SetImportRecordOverlayStatus
-=over 4
-
-SetImportRecordOverlayStatus($import_record_id, $new_overlay_status);
-
-=back
+ SetImportRecordOverlayStatus($import_record_id, $new_overlay_status);
=cut
=head2 GetImportRecordStatus
-=over 4
-
-my $overlay_status = GetImportRecordStatus($import_record_id);
-
-=back
+ my $overlay_status = GetImportRecordStatus($import_record_id);
=cut
=head2 SetImportRecordStatus
-=over 4
-
-SetImportRecordStatus($import_record_id, $new_overlay_status);
-
-=back
+ SetImportRecordStatus($import_record_id, $new_overlay_status);
=cut
=head2 GetImportRecordMatches
-=over 4
-
-my $results = GetImportRecordMatches($import_record_id, $best_only);
-
-=back
+ my $results = GetImportRecordMatches($import_record_id, $best_only);
=cut
=head2 SetImportRecordMatches
-=over 4
-
-SetImportRecordMatches($import_record_id, @matches);
-
-=back
+ SetImportRecordMatches($import_record_id, @matches);
=cut
=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.
=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
=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>
=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>.
=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
=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
=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
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
=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
=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;
=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.
=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
=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.
=head3 $pref->id
+=cut
+
=head3 $pref->branchcode
+=cut
+
=head3 $pref->categorycode
+=cut
+
=head3 $pref->item_type
+=cut
+
=head3 $pref->notification
=cut
=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
=head1 DESCRIPTION
+=cut
+
=head1 FUNCTIONS
=head2 getFrameworkLanguages
parameters :
- alertid : the alert id
deletes the alert
-
+
=cut
sub delalert ($) {
=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
return true on success
-=back
-
=cut
sub EnqueueLetter ($) {
=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 (;$) {
=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 {
=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 {
=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 {
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');
=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
=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
=head1 FUNCTIONS
-=over 2
-
-=item remoteprint
+=head2 remoteprint
&remoteprint($items, $borrower);
return $slip;
}
-=item printslip
+=head2 printslip
&printslip($borrowernumber)
- print a slip for the given $borrowernumber
-
+print a slip for the given $borrowernumber
+
=cut
#'
1;
__END__
-=back
-
=head1 AUTHOR
Koha Development Team <info@koha.org>
=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.
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
);
}
-=item AddReserve
+=head2 AddReserve
AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found)
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>.
return ( $#results + 1, \@results );
}
-=item GetReservesFromItemnumber
+=head2 GetReservesFromItemnumber
( $reservedate, $borrowernumber, $branchcode ) = GetReservesFromItemnumber($itemnumber);
- TODO :: Description here
+TODO :: Description here
=cut
return ( $reservedate, $borrowernumber, $branchcode );
}
-=item GetReservesFromBorrowernumber
+=head2 GetReservesFromBorrowernumber
$borrowerreserv = GetReservesFromBorrowernumber($borrowernumber,$tatus);
-
- TODO :: Descritpion
-
+
+TODO :: Descritpion
+
=cut
sub GetReservesFromBorrowernumber {
return @$data;
}
#-------------------------------------------------------------------------------------
-=item CanBookBeReserved
+=head2 CanBookBeReserved
-$error = &CanBookBeReserved($borrowernumber, $biblionumber)
+ $error = &CanBookBeReserved($borrowernumber, $biblionumber)
=cut
}
-=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
}
}
#--------------------------------------------------------------------------------
-=item GetReserveCount
+=head2 GetReserveCount
-$number = &GetReserveCount($borrowernumber);
+ $number = &GetReserveCount($borrowernumber);
this function returns the number of reservation for a borrower given on input arg.
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
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
return $fee;
}
-=item GetReservesToBranch
+=head2 GetReservesToBranch
-@transreserv = GetReservesToBranch( $frombranch );
+ @transreserv = GetReservesToBranch( $frombranch );
Get reserve list for a given branch
return (@transreserv);
}
-=item GetReservesForBranch
+=head2 GetReservesForBranch
-@transreserv = GetReservesForBranch($frombranch);
+ @transreserv = GetReservesForBranch($frombranch);
=cut
return $found;
}
-=item CheckReserves
+=head2 CheckReserves
($status, $reserve) = &CheckReserves($itemnumber);
($status, $reserve) = &CheckReserves(undef, $barcode);
}
}
-=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 {
}
-=item CancelReserve
+=head2 CancelReserve
&CancelReserve($biblionumber, $itemnumber, $borrowernumber);
}
}
-=item ModReserve
-
-=over 4
+=head2 ModReserve
-ModReserve($rank, $biblio, $borrower, $branch[, $itemnumber])
-
-=back
+ ModReserve($rank, $biblio, $borrower, $branch[, $itemnumber])
Change a hold request's priority or cancel it.
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.
}
}
-=item ModReserveFill
+=head2 ModReserveFill
&ModReserveFill($reserve);
}
}
-=item ModReserveStatus
+=head2 ModReserveStatus
-&ModReserveStatus($itemnumber, $newstatus);
+ &ModReserveStatus($itemnumber, $newstatus);
Update the reserve status for the active (priority=0) reserve.
}
}
-=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.
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 {
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
return ( $messages, $nextreservinfo );
}
-=item ModReserveMinusPriority
+=head2 ModReserveMinusPriority
-&ModReserveMinusPriority($itemnumber,$borrowernumber,$biblionumber)
+ &ModReserveMinusPriority($itemnumber,$borrowernumber,$biblionumber)
Reduce the values of queuded list
_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 {
}
-=item IsAvailableForItemLevelRequest
-
-=over 4
+=head2 IsAvailableForItemLevelRequest
-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
}
}
-=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 ) = @_;
}
}
-=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 {
_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
}
}
-=item _Findgroupreserve
+=head2 _Findgroupreserve
@results = &_Findgroupreserve($biblioitemnumber, $biblionumber, $itemnumber);
return @results;
}
-=item _koha_notify_reserve
-
-=over 4
-
-_koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber );
+=head2 _koha_notify_reserve
-=back
+ _koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber );
Sends a notification to the patron that their hold has been filled (through
ModReserveAffect, _not_ ModReserveFill)
}
}
-=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
return $new_priority; # so the caller knows what priority they wind up receiving
}
-=back
-
=head1 AUTHOR
Koha Development Team <info@koha.org>
=head1 FUNCTIONS
-=over 2
-
=cut
@ISA = qw( Exporter );
GetCollectionItemBranches
);
-=item CreateCollection
+=head2 CreateCollection
( $success, $errorcode, $errormessage ) = CreateCollection( $title, $description );
Creates a new collection
$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 ) = @_;
$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
$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 ) = @_;
}
-=item DeleteCollection
+=head2 DeleteCollection
+
( $success, $errorcode, $errormessage ) = DeleteCollection( $colId );
Deletes a collection of the given id
$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 ) = @_;
return 1;
}
-=item GetCollections
+=head2 GetCollections
+
$collections = GetCollections();
Returns data about all collections
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;
return \@results;
}
-=item GetItemsInCollection
+=head2 GetItemsInCollection
+
( $results, $success, $errorcode, $errormessage ) = GetItemsInCollection( $colId );
+
Returns information about the items in the given collection
Input:
$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 ) = @_;
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 ) = @_;
}
-=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.
$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 ) = @_;
}
-=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.
$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 ) = @_;
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
$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 ) = @_;
}
-=item GetCollectionItemBranches
- my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
+=head2 GetCollectionItemBranches
+
+ my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
+
=cut
+
sub GetCollectionItemBranches {
my ( $itemnumber ) = @_;
);
}
-=item isItemInThisCollection
-$inCollection = isItemInThisCollection( $itemnumber, $colId );
-=cut
+=head2 isItemInThisCollection
+
+ $inCollection = isItemInThisCollection( $itemnumber, $colId );
+
+=cut
+
sub isItemInThisCollection {
my ( $itemnumber, $colId ) = @_;
return $$row{'inCollection'};
}
-=item isItemInAnyCollection
+=head2 isItemInAnyCollection
+
$inCollection = isItemInAnyCollection( $itemnumber );
+
=cut
+
sub isItemInAnyCollection {
my ( $itemnumber ) = @_;
__END__
-=back
-
=head1 AUTHOR
Kyle Hall <kylemhall@gmail.com>
=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)
=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{
=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{
=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{
=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($) {
=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
=head2 _filter_columns
-=over 4
-
-_filter_columns($tablename,$research, $filtercolumns)
-
-=back
+ _filter_columns($tablename,$research, $filtercolumns)
Given
- a tablename
}
=head2 _filter_fields
-=over 4
-
-_filter_fields
-
-=back
+ _filter_fields
Given
- a tablename
=head1 DESCRIPTION
+=cut
=head1 METHODS
-=over 2
-
-=cut
-
-=item get_jobs();
+=head2 get_jobs();
This will return all scheduled jobs
return ($jobs);
}
-=item get_at_jobs();
+=head2 get_at_jobs();
This will return all At scheduled jobs
return (\%jobs);
}
-=item get_at_job($id)
+=head2 get_at_job($id)
This will return the At job with the given id
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.
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.
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
=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>.
=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
=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
=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.
=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.
=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.