aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/ajax.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index e9f03baac3..64670f9d10 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -79,18 +79,18 @@ function submitPermissions() {
forumIds = [],
permissionSubmitFailed = false;
- if ($submitAllButton === $submitButton) {
- $.each(fieldsetList, function (key, value) {
- if (key % 5 === 0) {
- formDataSets[Math.floor(key / 5)] = $form.find('fieldset#' + value.id).serialize();
- } else {
- formDataSets[Math.floor(key / 5)] += '&' + $form.find('fieldset#' + value.id).serialize();
- }
- });
- } else {
- formDataSets[0] = $form.find('fieldset#' + $submitButton.closest('fieldset.permissions').id).serialize();
+ if ($submitAllButton !== $submitButton) {
+ fieldsetList = $form.find('fieldset#' + $submitButton.closest('fieldset.permissions').id);
}
+ $.each(fieldsetList, function (key, value) {
+ if (key % 5 === 0) {
+ formDataSets[Math.floor(key / 5)] = $form.find('fieldset#' + value.id).serialize();
+ } else {
+ formDataSets[Math.floor(key / 5)] += '&' + $form.find('fieldset#' + value.id).serialize();
+ }
+ });
+
// Add each forum ID to forum ID list to preserve selected forums
$.each($form.find('input[type=hidden][name^=forum_id]'), function (key, value) {
if (value.name.match(/^forum_id\[([0-9]+)\]$/)) {