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

(-)a/cataloguing/merge_ajax.pl (-14 / +9 lines)
Lines 1-29 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use strict;
3
use Modern::Perl;
4
#use warnings; FIXME - Bug 2505
5
4
6
# standard or CPAN modules used
7
use IO::File;
8
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
9
use CGI::Session;
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
7
use JSON;
8
10
use C4::Context;
9
use C4::Context;
11
use C4::Biblio;
10
use C4::Biblio;
12
use C4::Auth qw/check_cookie_auth/;
11
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
17
12
18
my %cookies = fetch CGI::Cookie;
13
my %cookies = CGI::Cookie->fetch;
19
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
14
my ( $auth_status, $sessionID ) = check_cookie_auth(
15
    $cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' },
16
);
17
my $reply = CGI->new;
20
if ($auth_status ne "ok") {
18
if ($auth_status ne "ok") {
21
    my $reply = CGI->new("");
22
    print $reply->header(-type => 'text/html');
19
    print $reply->header(-type => 'text/html');
23
    exit 0;
20
    exit 0;
24
} 
21
} 
25
22
26
my $reply = new CGI;
27
my $framework = $reply->param('frameworkcode');
23
my $framework = $reply->param('frameworkcode');
28
my $tagslib = GetMarcStructure(1, $framework);
24
my $tagslib = GetMarcStructure(1, $framework);
29
print $reply->header(-type => 'text/html');
25
print $reply->header(-type => 'text/html');
30
- 

Return to bug 14588