From 8babb9606b73e56484f4dd3659f698a0d3e044b5 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Wed, 14 Jan 2015 13:35:24 +0800 Subject: [PATCH] MDL-48823 admin: Just one admin tree reload after settings changes --- admin/category.php | 3 +-- admin/search.php | 1 - admin/settings.php | 1 - admin/upgradesettings.php | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/admin/category.php b/admin/category.php index 223cd5bedefc1..7847b2d9d84b6 100644 --- a/admin/category.php +++ b/admin/category.php @@ -67,7 +67,6 @@ $errormsg = get_string('errorwithsettings', 'admin'); $firsterror = reset($adminroot->errors); } - $adminroot = admin_get_root(true); //reload tree $settingspage = $adminroot->locate($category, true); } @@ -156,4 +155,4 @@ echo html_writer::end_tag('fieldset'); echo html_writer::end_tag('form'); -echo $OUTPUT->footer(); \ No newline at end of file +echo $OUTPUT->footer(); diff --git a/admin/search.php b/admin/search.php index d60f09374d1be..748ef5b2d70bc 100644 --- a/admin/search.php +++ b/admin/search.php @@ -22,7 +22,6 @@ if (admin_write_settings($data)) { $statusmsg = get_string('changessaved'); } - $adminroot = admin_get_root(true); //reload tree if (!empty($adminroot->errors)) { $errormsg = get_string('errorwithsettings', 'admin'); diff --git a/admin/settings.php b/admin/settings.php index 323644467b652..2acbc835e0ec3 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -48,7 +48,6 @@ $errormsg = get_string('errorwithsettings', 'admin'); $firsterror = reset($adminroot->errors); } - $adminroot = admin_get_root(true); //reload tree $settingspage = $adminroot->locate($section, true); } diff --git a/admin/upgradesettings.php b/admin/upgradesettings.php index 6fe6b4b3aa4cd..38a8f065ba1fa 100644 --- a/admin/upgradesettings.php +++ b/admin/upgradesettings.php @@ -24,7 +24,6 @@ // now we'll deal with the case that the admin has submitted the form with new settings if ($data = data_submitted() and confirm_sesskey()) { $count = admin_write_settings($data); - $adminroot = admin_get_root(true); //reload tree } $newsettings = admin_output_new_settings_by_page($adminroot);