mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-73734 tool_httpreplace: Use streaming output api
This commit is contained in:
parent
d5860ac566
commit
9a8fccbabc
@ -151,6 +151,7 @@ class url_finder {
|
||||
sort($tables); // Make it easier to see progress because they are ordered.
|
||||
$numberoftables = count($tables);
|
||||
$tablenumber = 0;
|
||||
sort($tables);
|
||||
foreach ($tables as $table) {
|
||||
if ($progress) {
|
||||
$progress->update($tablenumber, $numberoftables, get_string('searching', 'tool_httpsreplace', $table));
|
||||
|
@ -58,6 +58,14 @@ $finder = new \tool_httpsreplace\url_finder();
|
||||
$PAGE->set_cacheable(false);
|
||||
$progressbar = new progress_bar();
|
||||
|
||||
// Preemptively reset the navcache before closing, so it remains the same on shutdown.
|
||||
navigation_cache::destroy_volatile_caches();
|
||||
\core\session\manager::write_close();
|
||||
|
||||
// Prepare for streamed output.
|
||||
echo $OUTPUT->footer();
|
||||
echo $OUTPUT->select_element_for_append();
|
||||
|
||||
if (!$data = $form->get_data()) {
|
||||
|
||||
echo $progressbar->create();
|
||||
@ -103,4 +111,3 @@ if (!$data = $form->get_data()) {
|
||||
|
||||
echo $OUTPUT->continue_button(new moodle_url('/admin/settings.php', ['section' => 'httpsecurity']));
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user