View | Details | Raw Unified | Return to bug 8829
Collapse All | Expand All

(-)a/C4/Auth.pm (-2 / +8 lines)
Lines 653-659 sub checkauth { Link Here
653
            $ip       = $session->param('ip');
653
            $ip       = $session->param('ip');
654
            $lasttime = $session->param('lasttime');
654
            $lasttime = $session->param('lasttime');
655
            $userid   = $session->param('id');
655
            $userid   = $session->param('id');
656
			$sessiontype = $session->param('sessiontype');
656
            $sessiontype = $session->param('sessiontype') || '';
657
        }
657
        }
658
        if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) )
658
        if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) )
659
          || ( $cas && $query->param('ticket') ) ) {
659
          || ( $cas && $query->param('ticket') ) ) {
Lines 1492-1498 sub getuserflags { Link Here
1492
    my $userid  = shift;
1492
    my $userid  = shift;
1493
    my $dbh     = @_ ? shift : C4::Context->dbh;
1493
    my $dbh     = @_ ? shift : C4::Context->dbh;
1494
    my $userflags;
1494
    my $userflags;
1495
    $flags = 0 unless $flags;
1495
    { 
1496
        # I don't want to do this, but if someone logs in as the database
1497
        # user, it would be preferable not to spam them to death with
1498
        # numeric warnings. So, we make $flags numeric.
1499
        no warnings 'numeric';
1500
        $flags += 0;
1501
    }
1496
    my $sth = $dbh->prepare("SELECT bit, flag, defaulton FROM userflags");
1502
    my $sth = $dbh->prepare("SELECT bit, flag, defaulton FROM userflags");
1497
    $sth->execute;
1503
    $sth->execute;
1498
1504
(-)a/C4/ImportBatch.pm (-3 / +2 lines)
Lines 1306-1312 sub GetImportRecordMatches { Link Here
1306
    $sth->execute();
1306
    $sth->execute();
1307
    while (my $row = $sth->fetchrow_hashref) {
1307
    while (my $row = $sth->fetchrow_hashref) {
1308
        if ($row->{'record_type'} eq 'auth') {
1308
        if ($row->{'record_type'} eq 'auth') {
1309
            $row->{'authorized_heading'} = GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
1309
            $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
1310
        }
1310
        }
1311
        next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'});
1311
        next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'});
1312
        push @$results, $row;
1312
        push @$results, $row;
Lines 1375-1381 sub _add_auth_fields { Link Here
1375
    if ($marc_record->field('001')) {
1375
    if ($marc_record->field('001')) {
1376
        $controlnumber = $marc_record->field('001')->data();
1376
        $controlnumber = $marc_record->field('001')->data();
1377
    }
1377
    }
1378
    my $authorized_heading = GetAuthorizedHeading({ record => $marc_record });
1378
    my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });
1379
    my $dbh = C4::Context->dbh;
1379
    my $dbh = C4::Context->dbh;
1380
    my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)");
1380
    my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)");
1381
    $sth->execute($import_record_id, $controlnumber, $authorized_heading);
1381
    $sth->execute($import_record_id, $controlnumber, $authorized_heading);
1382
- 

Return to bug 8829