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

(-)a/C4/ImportExportFramework.pm (-1 / +4 lines)
Lines 193-199 Functions for handling import/export. Link Here
193
193
194
=head2 ExportFramework
194
=head2 ExportFramework
195
195
196
Export all the information of a MARC or Authority Type Framework to an excel "xml" file, comma separated values "csv" file or OpenDocument SpreadSheet "ods" file.
196
Export all information of a bibliographic or authority MARC framework to an Excel "xml" file, comma separated values "csv" or OpenDocument SpreadSheet "ods".
197
197
198
return :
198
return :
199
succes
199
succes
Lines 647-652 sub ImportFramework Link Here
647
    my $tempdir;
647
    my $tempdir;
648
    my $ok = -1;
648
    my $ok = -1;
649
    my $dbh = C4::Context->dbh;
649
    my $dbh = C4::Context->dbh;
650
    $frameworktype ||= '';
650
    if (-r $filename && $dbh) {
651
    if (-r $filename && $dbh) {
651
        my $extension = '';
652
        my $extension = '';
652
        if ($filename =~ /\.(csv|ods|xml)$/i) {
653
        if ($filename =~ /\.(csv|ods|xml)$/i) {
Lines 821-826 sub _import_table Link Here
821
    my %fields2Delete;
822
    my %fields2Delete;
822
    my $query;
823
    my $query;
823
    my @fields;
824
    my @fields;
825
    $frameworktype ||= '';
824
    # Create hash with all elements defined by primary key to know which ones to delete after parsing the spreadsheet
826
    # Create hash with all elements defined by primary key to know which ones to delete after parsing the spreadsheet
825
    eval {
827
    eval {
826
        @fields = @$PKArray;
828
        @fields = @$PKArray;
Lines 1115-1120 sub _getDataFields Link Here
1115
1117
1116
    my $dataFields = {};
1118
    my $dataFields = {};
1117
    my @dataFieldsA = ();
1119
    my @dataFieldsA = ();
1120
    $frameworktype ||= '';
1118
    if ($node && $node->hasChildNodes()) {
1121
    if ($node && $node->hasChildNodes()) {
1119
        my $node2 = $node->firstChild;
1122
        my $node2 = $node->firstChild;
1120
        my ($data, $repeated);
1123
        my ($data, $repeated);
(-)a/admin/import_export_authtype.pl (-1 / +1 lines)
Lines 33-39 if (exists $cookies{'CGISESSID'}) { Link Here
33
    );
33
    );
34
}
34
}
35
35
36
my $input = new CGI;
36
my $input = CGI->new;
37
37
38
unless ($auth_status eq 'ok') {
38
unless ($auth_status eq 'ok') {
39
    print $input->header(-type => 'text/plain', -status => '403 Forbidden');
39
    print $input->header(-type => 'text/plain', -status => '403 Forbidden');
(-)a/koha-tmpl/intranet-tmpl/prog/js/authtype.js (-2 / +1 lines)
Lines 34-40 $(document).ready(function() { Link Here
34
34
35
    var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search);
35
    var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search);
36
    if (matches && matches.length > 1) {
36
    if (matches && matches.length > 1) {
37
        alert(_("Error importing the authority type %s").format(decodeURIComponent(matches[1])));
37
        alert(__("Error importing the authority type %s").format(decodeURIComponent(matches[1])));
38
    }
38
    }
39
39
40
    $('input.input_import').change( function() {
40
    $('input.input_import').change( function() {
41
- 

Return to bug 13952