Bug 9727: Fix typo in variable name
[koha.git] / cataloguing / merge_ajax.pl
blob26f08003ac238fbfc908bb1244fd47c336c46ec4
1 #!/usr/bin/perl
3 use strict;
4 #use warnings; FIXME - Bug 2505
6 # standard or CPAN modules used
7 use IO::File;
8 use CGI;
9 use CGI::Session;
10 use C4::Context;
11 use C4::Biblio;
12 use C4::Auth qw/check_cookie_auth/;
13 use C4::UploadedFile;
14 use JSON;
15 use CGI::Cookie; # need to check cookies before
16 # having CGI parse the POST request
18 my %cookies = fetch CGI::Cookie;
19 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
20 if ($auth_status ne "ok") {
21 my $reply = CGI->new("");
22 print $reply->header(-type => 'text/html');
23 exit 0;
26 my $reply = new CGI;
27 my $framework = $reply->param('frameworkcode');
28 my $tagslib = GetMarcStructure(1, $framework);
29 print $reply->header(-type => 'text/html');
30 print encode_json $tagslib;