Skip to content

Commit

Permalink
MDL-48823 admin: Just one admin tree reload after settings changes
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Jan 21, 2015
1 parent da0ef2e commit 8babb96
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions admin/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -156,4 +155,4 @@
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');

echo $OUTPUT->footer();
echo $OUTPUT->footer();
1 change: 0 additions & 1 deletion admin/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion admin/upgradesettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8babb96

Please sign in to comment.