Bugzilla – Attachment 83026 Details for
Bug 13952
Import and export of authority types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13952: (follow-up) Fixing import for default auth type
Bug-13952-follow-up-Fixing-import-for-default-auth.patch (text/plain), 2.45 KB, created by
Owen Leonard
on 2018-12-10 18:42:44 UTC
(
hide
)
Description:
Bug 13952: (follow-up) Fixing import for default auth type
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-12-10 18:42:44 UTC
Size:
2.45 KB
patch
obsolete
>From ed27c85801ee3e3c711f839660e65401fff5b696 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 19 Oct 2017 23:57:13 +0000 >Subject: [PATCH] Bug 13952: (follow-up) Fixing import for default auth type > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/import_export_authtype.pl | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/admin/import_export_authtype.pl b/admin/import_export_authtype.pl >index 05cdb7c..7af823b 100755 >--- a/admin/import_export_authtype.pl >+++ b/admin/import_export_authtype.pl >@@ -76,6 +76,9 @@ if ($action eq 'export' && $input->request_method() eq 'GET') { > } elsif ($input->request_method() eq 'POST') { > my $ok = -1; > my $fieldname = 'file_import_' . $authtypecode; >+ if ($authtypecode eq 'default'){ >+ $fieldname = 'file_import_'; >+ } > my $filename = $input->param($fieldname); > # upload the input file > if ($filename && $filename =~ /\.(csv|ods|xml)$/i) { >@@ -84,11 +87,19 @@ if ($action eq 'export' && $input->request_method() eq 'GET') { > if ($uploadFd && !$input->cgi_error) { > my $tmpfilename = $input->tmpFileName(scalar $input->param($fieldname)); > $filename = $tmpfilename . '.' . $extension; # rename the tmp file with the extension >- $ok = ImportFramework($filename, $authtypecode, 1, 'authority') if (rename($tmpfilename, $filename)); >+ if ($authtypecode eq 'default') { >+ $ok = ImportFramework($filename, '', 1, 'authority') if (rename($tmpfilename, $filename)); >+ } else { >+ $ok = ImportFramework($filename, $authtypecode, 1, 'authority') if (rename($tmpfilename, $filename)); >+ } > } > } > if ($ok >= 0) { # If everything went ok go to the authority type marc structure >- print $input->redirect( -location => '/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=' . $authtypecode); >+ if ($authtypecode eq 'default'){ >+ print $input->redirect( -location => '/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode='); >+ } else { >+ print $input->redirect( -location => '/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=' . $authtypecode); >+ } > } else { > # If something failed go to the list of authority types and show message > print $input->redirect( -location => '/cgi-bin/koha/admin/authtypes.pl?error_import_export=' . $authtypecode); >-- >2.1.4
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 13952
:
44770
|
47326
|
47360
|
47364
|
50046
|
53065
|
53066
|
54840
|
54899
|
54900
|
57873
|
59831
|
64421
|
67914
|
67915
|
68299
|
68300
|
68301
|
68502
|
68512
|
68513
|
68514
|
68515
|
68556
|
69940
|
69941
|
69942
|
69943
|
69944
|
76665
|
76666
|
76667
|
76668
|
80794
|
80795
|
80796
|
80797
|
81248
|
82853
|
82854
|
82855
|
82856
|
82895
|
83024
|
83025
|
83026
|
83027
|
83028
|
85073
|
86549
|
86550
|
86551
|
86552
|
86553
|
86554
|
86555
|
103610
|
103611
|
103612
|
103613
|
103614
|
103615
|
103616
|
114170
|
114171
|
114172
|
114173
|
114174
|
114175
|
114176
|
114177
|
115379
|
115381
|
115382
|
115383
|
115384
|
115385
|
115386
|
115387
|
115388
|
125383
|
125384
|
125385
|
125386
|
125387
|
125388
|
125389
|
125390
|
128316
|
128317
|
128318
|
128319
|
128320
|
128321
|
128322
|
128323
|
128324
|
128325
|
128326
|
128327
|
128328
|
128329
|
128330
|
128331
|
130587
|
130917
|
130918
|
130919
|
130920
|
130921
|
130922
|
130923
|
130924
|
130925