Commit adb0f1ff authored by Nigel McNie's avatar Nigel McNie
Browse files

Don't automatically serve the file if the browser is opera - it fails horribly...

Don't automatically serve the file if the browser is opera - it fails horribly and tries to display the content inline.
parent ae7eab32
......@@ -123,8 +123,12 @@ $strexportgeneratedsuccessfullyjs = get_string('exportgeneratedsuccessfullyjs',
$strexportgeneratedsuccessfully = get_string('exportgeneratedsuccessfully', 'export', '<a href="download.php" target="_top">', '</a>');
?>
<script type="text/javascript">
document.write('<div class="progress-bar" style="width: 100%;"><p><?php echo $strexportgeneratedsuccessfullyjs; ?></p>');
document.location = 'download.php';
document.write('<div class="progress-bar" style="width: 100%;"><p><?php echo $strexportgeneratedsuccessfullyjs; ?></p></div>');
if (!window.opera) {
// Opera can't handle this for some reason - it vomits out the
// download inline in the iframe
document.location = 'download.php';
}
</script>
<div class="progress-bar" style="width: 100%;">
<p><?php echo $strexportgeneratedsuccessfully; ?></p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment