update_bib()

Function:
update_bib ($bib_arr)

Purpose:
update_bib() takes an array of bib numbers and brings the locum_bib_items table in sync with reality. If the last update date doesn't match to the locum_bib_items record, it will be downloaded and re-imported with the new information. This process also checks for weeded records and will retire any records no longer in the system.

Arguments:
$bib_arr : (array) required Array of bib numbers and latest modification dates from locum_bib_items.

Array
(
    [{bib number}] => (date) date of last update (from bib_lastupdate in locum_bib_items)
)

Returns:

Array of information about import run
(
    [retired] => (int) # of items weeded (marked as inactive)
    [updated] => (int) # of items updated
    [skipped] => (int) # of items skipped (happens if ILS server is down or if there is any other general failure)
)