Lines 30-37
use C4::BackgroundJob;
Link Here
|
30 |
use CGI::Cookie; # need to check cookies before |
30 |
use CGI::Cookie; # need to check cookies before |
31 |
# having CGI parse the POST request |
31 |
# having CGI parse the POST request |
32 |
|
32 |
|
33 |
my $input = new CGI; |
33 |
my $input = CGI->new; |
34 |
my %cookies = fetch CGI::Cookie; |
34 |
my %cookies = CGI::Cookie->fetch; |
35 |
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { tools => '*' }); |
35 |
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { tools => '*' }); |
36 |
if ($auth_status ne "ok") { |
36 |
if ($auth_status ne "ok") { |
37 |
my $reply = CGI->new(""); |
37 |
my $reply = CGI->new(""); |
Lines 51-57
if (defined $job) {
Link Here
|
51 |
$job_status = $job->status(); |
51 |
$job_status = $job->status(); |
52 |
} |
52 |
} |
53 |
|
53 |
|
54 |
my $reply = CGI->new(""); |
54 |
my $reply = CGI->new; |
55 |
print $reply->header(-type => 'text/html'); |
55 |
print $reply->header(-type => 'text/html'); |
56 |
# response will be sent back as JSON |
56 |
# response will be sent back as JSON |
57 |
print '{"progress":"' . $reported_progress . '","job_size":"' . $job_size . '","job_status":"' . $job_status . '"}'; |
57 |
print '{"progress":"' . $reported_progress . '","job_size":"' . $job_size . '","job_status":"' . $job_status . '"}'; |
58 |
- |
|
|