C4::Maintenance - Koha catalog maintenance functions
use C4::Maintenance;
The functions in this module perform various catalog-maintenance functions, including deleting and undeleting books, fixing miscategorized items, etc.
($count, $results) = &listsubjects($subject, $n, $offset);
Finds the subjects that begin with $subject
in the bibliosubject table of the Koha database.
&listsubjects
returns a two-element array. $results
is a reference-to-array, in which each element is a reference-to-hash giving information about the given subject. $count
is the number of elements in @{$results}
.
Probably the only interesting field in $results-
[$i]> is subject
, the subject in question.
&listsubject
returns up to $n
items, starting at $offset
. If $n
is 0, it will return all matching subjects.
&shiftgroup($biblionumber, $biblioitemnumber);
Changes the biblionumber associated with a given biblioitem. $biblioitemnumber
is the number of the biblioitem to change. $biblionumber
is the biblionumber to associate it with.
($count, $results) = &deletedbib($title);
Looks up deleted books whose title begins with $title
.
&deletedbib
returns a two-element list. $results
is a reference-to-array; each element is a reference-to-hash whose keys are the fields of the deletedbiblio table in the Koha database. $count
is the number of elements in $results
.
&undeletebib($biblionumber);
Undeletes a book. &undeletebib
looks up the book with the given biblionumber in the deletedbiblio table of the Koha database, and moves its entry to the biblio table.
&updatetype($biblioitemnumber, $itemtype);
Changes the type of the item with the given biblioitemnumber to be $itemtype
.
Koha Developement team <info@koha.org>