diff --git a/backup/backup.php b/backup/backup.php index 688726daee3..4e8ba890acf 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -138,7 +138,9 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) { } // Get HTML from logger. - $loghtml = $logger->get_html(); + if ($CFG->debugdisplay) { + $loghtml = $logger->get_html(); + } // Hide the progress display and first backup step bar (the 'finished' step will show next). echo html_writer::end_div(); diff --git a/backup/restore.php b/backup/restore.php index 25a216cff0f..ab97369cb6c 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -110,7 +110,9 @@ if (!$restore->is_independent()) { // Do actual restore. $restore->execute(); // Get HTML from logger. - $loghtml = $logger->get_html(); + if ($CFG->debugdisplay) { + $loghtml = $logger->get_html(); + } // Hide this section because we are now going to make the page show 'finished'. echo html_writer::end_div(); echo html_writer::script('document.getElementById("executionprogress").style.display = "none";');