From d14ba3a2f4ad94b2d217f5606ee002e55aa09f32 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 1 Feb 2016 12:37:27 +0800 Subject: [PATCH] MDL-52940 core_backup: prevent always displaying logs --- backup/backup.php | 4 +++- backup/restore.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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";');