Bugzilla – Attachment 12541 Details for
Bug 8829
can't import authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8829: Fix authority importing
SIGNED-OFF-Bug-8829-Fix-authority-importing.patch (text/plain), 2.94 KB, created by
Nicole C. Engard
on 2012-09-27 01:39:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8829: Fix authority importing
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-09-27 01:39:21 UTC
Size:
2.94 KB
patch
obsolete
>From 11471fba21567b3e88211ce56c02cf3911117519 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Wed, 26 Sep 2012 16:33:15 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 8829: Fix authority importing > >A subroutine was not being imported by C4::ImportBatch (ironic, no?) >so this patch makes the call fully-qualified. This patch also cleans >up two warnings in C4::Auth that are raised when logged in as the >database user. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Auth.pm | 10 ++++++++-- > C4/ImportBatch.pm | 4 ++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 5486f76..7b6fbe1 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -653,7 +653,7 @@ sub checkauth { > $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') ) ) { >@@ -1492,7 +1492,13 @@ sub getuserflags { > 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; > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index a655f29..648d96e 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -1306,7 +1306,7 @@ sub GetImportRecordMatches { > $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; >@@ -1375,7 +1375,7 @@ sub _add_auth_fields { > 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); >-- >1.7.2.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8829
:
12539
| 12541