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

(-)a/svc/article_request (-1 / +1 lines)
Lines 35-41 if ( $auth_status ne "ok" ) { Link Here
35
}
35
}
36
36
37
binmode STDOUT, ':encoding(UTF-8)';
37
binmode STDOUT, ':encoding(UTF-8)';
38
print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' );
38
print $cgi->header( -type => 'application/json', -charset => 'UTF-8' );
39
39
40
my $id = $cgi->param('id');
40
my $id = $cgi->param('id');
41
my $op = $cgi->param('op') || q{};
41
my $op = $cgi->param('op') || q{};
(-)a/svc/checkouts (-1 / +1 lines)
Lines 62-68 $sorting_direction = $sorting_direction eq 'asc' ? 'asc' : 'desc'; Link Here
62
$results_per_page = undef if ( $results_per_page == -1 );
62
$results_per_page = undef if ( $results_per_page == -1 );
63
63
64
binmode STDOUT, ":encoding(UTF-8)";
64
binmode STDOUT, ":encoding(UTF-8)";
65
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
65
print $input->header( -type => 'application/json', -charset => 'UTF-8' );
66
66
67
my @parameters;
67
my @parameters;
68
my $sql = '
68
my $sql = '
(-)a/svc/club/cancel_enrollment (-1 / +1 lines)
Lines 41-46 my $enrollment = Koha::Club::Enrollments->find($id); Link Here
41
$enrollment->cancel() if $enrollment;
41
$enrollment->cancel() if $enrollment;
42
42
43
binmode STDOUT, ':encoding(UTF-8)';
43
binmode STDOUT, ':encoding(UTF-8)';
44
print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' );
44
print $cgi->header( -type => 'application/json', -charset => 'UTF-8' );
45
45
46
print to_json( { success => $enrollment ? 1 : 0 } );
46
print to_json( { success => $enrollment ? 1 : 0 } );
(-)a/svc/club/delete (-1 / +1 lines)
Lines 44-49 if ($club && $op eq 'cud-delete') { Link Here
44
}
44
}
45
45
46
binmode STDOUT, ':encoding(UTF-8)';
46
binmode STDOUT, ':encoding(UTF-8)';
47
print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' );
47
print $cgi->header( -type => 'application/json', -charset => 'UTF-8' );
48
48
49
print to_json( { success => $success ? 1 : 0 } );
49
print to_json( { success => $success ? 1 : 0 } );
(-)a/svc/club/enroll (-1 / +1 lines)
Lines 90-96 elsif ($club) { Link Here
90
}
90
}
91
91
92
binmode STDOUT, ':encoding(UTF-8)';
92
binmode STDOUT, ':encoding(UTF-8)';
93
print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' );
93
print $cgi->header( -type => 'application/json', -charset => 'UTF-8' );
94
94
95
if($enrollent_id){
95
if($enrollent_id){
96
    print to_json( { success => @club_enrollment_fields ? 1 : 0 } );
96
    print to_json( { success => @club_enrollment_fields ? 1 : 0 } );
(-)a/svc/club/template/delete (-1 / +1 lines)
Lines 45-50 if ($club_template && $op eq 'cud-delete') { Link Here
45
}
45
}
46
46
47
binmode STDOUT, ':encoding(UTF-8)';
47
binmode STDOUT, ':encoding(UTF-8)';
48
print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' );
48
print $cgi->header( -type => 'application/json', -charset => 'UTF-8' );
49
49
50
print to_json( { success => $success ? 1 : 0 } );
50
print to_json( { success => $success ? 1 : 0 } );
(-)a/svc/holds (-1 / +1 lines)
Lines 56-62 my $iSortCol = $input->param('iSortCol_0') // 0; Link Here
56
my $sorting_column    = $sort_columns[$iSortCol] // 'reservedate';
56
my $sorting_column    = $sort_columns[$iSortCol] // 'reservedate';
57
57
58
binmode STDOUT, ":encoding(UTF-8)";
58
binmode STDOUT, ":encoding(UTF-8)";
59
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
59
print $input->header( -type => 'application/json', -charset => 'UTF-8' );
60
60
61
my $holds_rs = Koha::Holds->search(
61
my $holds_rs = Koha::Holds->search(
62
    { borrowernumber => $borrowernumber },
62
    { borrowernumber => $borrowernumber },
(-)a/svc/mana/share (-1 / +1 lines)
Lines 28-34 use JSON; Link Here
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
30
binmode STDOUT, ":encoding(UTF-8)";
30
binmode STDOUT, ":encoding(UTF-8)";
31
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
31
print $input->header( -type => 'application/json', -charset => 'UTF-8' );
32
32
33
my ( $auth_status ) =
33
my ( $auth_status ) =
34
  check_cookie_auth( $input->cookie('CGISESSID'),
34
  check_cookie_auth( $input->cookie('CGISESSID'),
(-)a/svc/mana/use (-1 / +1 lines)
Lines 30-36 use JSON; Link Here
30
30
31
my $input = CGI->new;
31
my $input = CGI->new;
32
binmode STDOUT, ":encoding(UTF-8)";
32
binmode STDOUT, ":encoding(UTF-8)";
33
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
33
print $input->header( -type => 'application/json', -charset => 'UTF-8' );
34
34
35
my ( $auth_status ) =
35
my ( $auth_status ) =
36
  check_cookie_auth( $input->cookie('CGISESSID'),
36
  check_cookie_auth( $input->cookie('CGISESSID'),
(-)a/svc/return_claims (-2 / +1 lines)
Lines 67-73 $sorting_direction = $sorting_direction eq 'asc' ? 'asc' : 'desc'; Link Here
67
$results_per_page = undef if ( $results_per_page == -1 );
67
$results_per_page = undef if ( $results_per_page == -1 );
68
68
69
binmode STDOUT, ":encoding(UTF-8)";
69
binmode STDOUT, ":encoding(UTF-8)";
70
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
70
print $input->header( -type => 'application/json', -charset => 'UTF-8' );
71
71
72
my $sql = qq{
72
my $sql = qq{
73
    SELECT
73
    SELECT
74
- 

Return to bug 36418