diff --git a/phpBB/adm/admin_permissions.php b/phpBB/adm/admin_permissions.php index a6596dc854..2d52771199 100644 --- a/phpBB/adm/admin_permissions.php +++ b/phpBB/adm/admin_permissions.php @@ -825,7 +825,6 @@ if (in_array($submit, array('options', 'presetsave', 'presetdel', 'update')) || if (option) { document.acl.set.selectedIndex = 0; - var expr = new RegExp(/\d+/); for (i = 0; i < document.acl.length; i++) { var elem = document.acl.elements[i]; @@ -854,7 +853,8 @@ if (in_array($submit, array('options', 'presetsave', 'presetdel', 'update')) || break; default: - option_name = elem.name.substr(9, elem.name.length - 10); + option_start = elem.name.search(/\[(\w+?)\]$/); + option_name = elem.name.substr(option_start + 1, elem.name.length - option_start - 2); if (presets[option].yes.indexOf(option_name + ',') != -1 && elem.value == ) elem.checked = true; @@ -911,7 +911,7 @@ if (in_array($submit, array('options', 'presetsave', 'presetdel', 'update')) || Will set options in:
-