Merge remote-tracking branch 'kc/new/bug_5449' into kcmaster

This commit is contained in:
Chris Cormack 2011-05-09 08:25:36 +12:00
commit 9573f444fc
8 changed files with 10 additions and 10 deletions

View File

@ -92,7 +92,7 @@ if ($completedJobID) {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ jobID: '$jobID' }";
print '{"jobID":"' . $jobID . '"}';
exit 0;
} elsif (defined $pid) {
# child

View File

@ -72,7 +72,7 @@ if ($completedJobID) {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ jobID: '$jobID' }";
print '{"jobID":"' . $jobID . '"}';
exit 0;
} elsif (defined $pid) {
# if we get here, we're a child that has detached

View File

@ -36,7 +36,7 @@ my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value,
if ($auth_status ne "ok") {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ progress: 0 }";
print '{"progress":"0"}';
exit 0;
}
@ -54,4 +54,4 @@ if (defined $job) {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
# response will be sent back as JSON
print "{ progress: $reported_progress, job_size: $job_size, job_status: '$job_status' }";
print '{"progress":"' . $reported_progress . '","job_size":"' . $job_size . '","job_status":"' . $job_status . '"}';

View File

@ -563,7 +563,7 @@ sub put_in_background {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ jobID: '$jobID' }";
print '{"jobID":"' . $jobID . '"}';
exit 0;
} elsif (defined $pid) {
# child

View File

@ -310,7 +310,7 @@ sub put_in_background {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ jobID: '$jobID' }";
print '{"jobID":"' . $jobID . '"}';
exit 0;
} elsif (defined $pid) {
# child

View File

@ -108,7 +108,7 @@ if ($completedJobID) {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ jobID: '$jobID' }";
print '{"jobID":"' . $jobID . '"}';
exit 0;
} elsif (defined $pid) {
# child

View File

@ -35,7 +35,7 @@ my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value,
if ($auth_status ne "ok") {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
print "{ progress: 0 }";
print '{"progress":"0"}';
exit 0;
}
@ -44,4 +44,4 @@ my $reported_progress = C4::UploadedFile->upload_progress($sessionID);
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
# response will be sent back as JSON
print "{ progress: $reported_progress }";
print '{"progress":"' . $reported_progress . '"}';

View File

@ -80,5 +80,5 @@ sub send_reply {
my $reply = CGI->new("");
print $reply->header(-type => 'text/html');
# response will be sent back as JSON
print "{ status: '$upload_status', fileid: '$fileid' }";
print '{"status":"' . $upload_status . '","fileid":"' . $fileid . '"}';
}