# Clone record as it gets modified
$record = $record->clone();
my $dbh = C4::Context->dbh;
my @fields = $record->fields();
my $encoding = C4::Context->preference("marcflavour");
my $onsite_checkout = $params->{onsite_checkout} || 0;
my $switch_onsite_checkout = $params->{switch_onsite_checkout} || 0;
my $cat_borrower = $patron->categorycode;
# Get which branchcode we need
my $branch = _GetCircControlBranch( $item, $patron );
my $type = shift;
$type = 'intranet' unless $type;
my $dbh = C4::Context->dbh();
my $template_name;
$template_name = "installer/auth.tt";
sub FindDuplicate {
my ($record) = @_;
my $result = TransformMarcToKoha( { record => $record } );
my $sth;
my $query;
# building the HTML output for the template
sub searchResults {
my ( $search_context, $searchdesc, $hits, $results_per_page, $offset, $scan, $marcresults, $xslt_variables ) = @_;
my @newresults;
require C4::Items;
sub _get_biblio_from_xisbn {
my $xisbn = shift;
my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } );
my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( "nb=$xisbn", 0, 1 );
my $input = CGI->new;
my $do_search = $input->param('do_search') || 0;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
template_name => "acqui/histsearch.tt",
$op = 'else' unless $op;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
template_name => "acqui/newordersuggestion.tt",
use Koha::Z3950Servers;
my $query = CGI->new;
my $op = $query->param('op') || '';
my $authtypecode = $query->param('authtypecode') || '';
my $authid = $query->param('authid') || '';
my $launcher = sub {
my ($params) = @_;
my $query = $params->{cgi};
my $op = $query->param('op') // '';
# -- op could be equal to
my $index = $input->param('index');
my $result = $input->param('result');
my $defaultlanguage = C4::Context->preference("UNIMARCField100Language");
$defaultlanguage = "fre" if ( !$defaultlanguage || length($defaultlanguage) != 3 );
template_name => "cataloguing/value_builder/unimarc_field_105.tt",
my $result = $input->param('result') || q{};
template_name => "cataloguing/value_builder/unimarc_field_106.tt",
template_name => "cataloguing/value_builder/unimarc_field_110.tt",
template_name => "cataloguing/value_builder/unimarc_field_115a.tt",
} else {
# And if the user is logged in, we deal with the database
# Deleting search history
if ( $op eq 'cud-delete' ) {
-