diff --git a/admin/settings.php b/admin/settings.php index 629224029fa..ecd24554855 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -38,7 +38,8 @@ if (!($settingspage->check_access())) { $statusmsg = ''; $errormsg = ''; -if ($data = data_submitted() and confirm_sesskey()) { +// Form is submitted with changed settings. Do not want to execute when modifying a block. +if ($data = data_submitted() and confirm_sesskey() and isset($data->action) and $data->action == 'save-settings') { $count = admin_write_settings($data); // Regardless of whether any setting change was written (a positive count), check validation errors for those that didn't. diff --git a/admin/templates/settings.mustache b/admin/templates/settings.mustache index 4f351b8d2c4..009730532f3 100644 --- a/admin/templates/settings.mustache +++ b/admin/templates/settings.mustache @@ -40,6 +40,7 @@