$ip = $session->param('ip');
$lasttime = $session->param('lasttime');
$userid = $session->param('id');
- $sessiontype = $session->param('sessiontype');
+ $sessiontype = $session->param('sessiontype') || '';
}
if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) )
|| ( $cas && $query->param('ticket') ) ) {
my $userid = shift;
my $dbh = @_ ? shift : C4::Context->dbh;
my $userflags;
- $flags = 0 unless $flags;
+ {
+ # I don't want to do this, but if someone logs in as the database
+ # user, it would be preferable not to spam them to death with
+ # numeric warnings. So, we make $flags numeric.
+ no warnings 'numeric';
+ $flags += 0;
+ }
my $sth = $dbh->prepare("SELECT bit, flag, defaulton FROM userflags");
$sth->execute;
$sth->execute();
while (my $row = $sth->fetchrow_hashref) {
if ($row->{'record_type'} eq 'auth') {
- $row->{'authorized_heading'} = GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
+ $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
}
next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'});
push @$results, $row;
if ($marc_record->field('001')) {
$controlnumber = $marc_record->field('001')->data();
}
- my $authorized_heading = GetAuthorizedHeading({ record => $marc_record });
+ my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)");
$sth->execute($import_record_id, $controlnumber, $authorized_heading);