Lines 10-26
use C4::Context;
Link Here
|
10 |
use C4::Biblio; |
10 |
use C4::Biblio; |
11 |
use C4::Auth qw/check_cookie_auth/; |
11 |
use C4::Auth qw/check_cookie_auth/; |
12 |
|
12 |
|
13 |
my %cookies = CGI::Cookie->fetch; |
13 |
my $input = CGI->new; |
14 |
my ( $auth_status, $sessionID ) = check_cookie_auth( |
14 |
my ( $auth_status, $sessionID ) = |
15 |
$cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' }, |
15 |
check_cookie_auth( $input->cookie('CGISESSID'), |
16 |
); |
16 |
{ editcatalogue => 'edit_catalogue' } ); |
17 |
my $reply = CGI->new; |
17 |
|
18 |
if ($auth_status ne "ok") { |
18 |
if ($auth_status ne "ok") { |
19 |
print $reply->header(-type => 'text/html'); |
19 |
print $input->header(-type => 'text/html'); |
20 |
exit 0; |
20 |
exit 0; |
21 |
} |
21 |
} |
22 |
|
22 |
|
23 |
my $framework = $reply->param('frameworkcode'); |
23 |
my $framework = $input->param('frameworkcode'); |
24 |
my $tagslib = GetMarcStructure(1, $framework); |
24 |
my $tagslib = GetMarcStructure(1, $framework); |
25 |
print $reply->header(-type => 'text/html'); |
25 |
print $input->header(-type => 'text/html'); |
26 |
print encode_json $tagslib; |
26 |
print encode_json $tagslib; |