Skip to content

Commit

Permalink
"MDL-23407, fixed the problem that firefox trying to download json re…
Browse files Browse the repository at this point in the history
…sponse"
  • Loading branch information
Dongsheng Cai committed Jul 20, 2010
1 parent d44bdfb commit ac1870e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions repository/repository_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,17 @@
}
break;
case 'upload':
// TODO: add file scanning MDL-19380 into each plugin
$result = $repo->upload();
echo json_encode($result);
// handle exception here instead moodle default exception handler
// see MDL-23407
try {
// TODO: add file scanning MDL-19380 into each plugin
$result = $repo->upload();
echo json_encode($result);
} catch (Exception $e) {
$err->error = $e->getMessage();
echo json_encode($err);
die;
}
break;
}

Expand Down

0 comments on commit ac1870e

Please sign in to comment.