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

(-)a/tools/showdiffmarc.pl (-12 / +2 lines)
Lines 22-29 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
# standard or CPAN modules used
24
# standard or CPAN modules used
25
use CGI qw(:standard);
25
use CGI qw(:standard -utf8);
26
use DBI;
27
26
28
# Koha modules used
27
# Koha modules used
29
use C4::Context;
28
use C4::Context;
Lines 31-39 use C4::Output; Link Here
31
use C4::Auth;
30
use C4::Auth;
32
use C4::Biblio;
31
use C4::Biblio;
33
use C4::ImportBatch;
32
use C4::ImportBatch;
34
use XML::LibXSLT;
35
use XML::LibXML;
36
37
33
38
# Input params
34
# Input params
39
my $input        = new CGI;
35
my $input        = new CGI;
Lines 41-56 my $biblionumber = $input->param('id'); Link Here
41
my $importid     = $input->param('importid');
37
my $importid     = $input->param('importid');
42
my $batchid      = $input->param('batchid');
38
my $batchid      = $input->param('batchid');
43
39
44
45
if ( not $biblionumber or not $importid ) {
40
if ( not $biblionumber or not $importid ) {
46
    print $input->redirect("/cgi-bin/koha/errors/404.pl");
41
    print $input->redirect("/cgi-bin/koha/errors/404.pl");
47
    exit;
42
    exit;
48
}
43
}
49
44
50
# Init vars
45
# Init vars
51
my ($recordBiblionumber, $recordImportid, $biblioTitle, $importTitle, $formatted1, $formatted2,
46
my ($recordBiblionumber, $recordImportid, $biblioTitle, $importTitle, $formatted1, $formatted2, $errorFormatted1, $errorFormatted2);
52
    $errorFormatted1, $errorFormatted2);
53
54
47
55
# Prepare template
48
# Prepare template
56
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
49
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Lines 64-70 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
64
    }
57
    }
65
);
58
);
66
59
67
68
$recordBiblionumber = GetMarcBiblio($biblionumber, 'embed_items');
60
$recordBiblionumber = GetMarcBiblio($biblionumber, 'embed_items');
69
if( $recordBiblionumber ) {
61
if( $recordBiblionumber ) {
70
    $formatted1 = $recordBiblionumber->as_formatted;
62
    $formatted1 = $recordBiblionumber->as_formatted;
Lines 83-89 if( $importid ) { Link Here
83
    $errorFormatted2 = 1;
75
    $errorFormatted2 = 1;
84
}
76
}
85
77
86
87
$template->param(
78
$template->param(
88
    SCRIPT_NAME      => '/cgi-bin/koha/tools/showdiffmarc.pl',
79
    SCRIPT_NAME      => '/cgi-bin/koha/tools/showdiffmarc.pl',
89
    BIBLIONUMBER     => $biblionumber,
80
    BIBLIONUMBER     => $biblionumber,
90
- 

Return to bug 17804