mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-31 13:48:04 +01:00
[ticket/15766] Use proper variable name for permission set
PHPBB3-15766
This commit is contained in:
parent
11cf09b41a
commit
18e75202d7
@ -322,21 +322,21 @@ function match_role_settings(id)
|
||||
{
|
||||
var fs = document.getElementById(id),
|
||||
cbs = fs.getElementsByTagName('input'),
|
||||
xyz = {};
|
||||
set = {};
|
||||
|
||||
for (var i = 0; i < cbs.length; i++) {
|
||||
var matches = cbs[i].id.match(/setting\[\d+]\[\d+]\[([a-z_]+)]/);
|
||||
|
||||
if (matches !== null && cbs[i].checked && cbs[i].value !== '-1') {
|
||||
xyz[matches[1]] = parseInt(cbs[i].value);
|
||||
set[matches[1]] = parseInt(cbs[i].value);
|
||||
}
|
||||
}
|
||||
|
||||
xyz = sort_and_stringify(xyz);
|
||||
set = sort_and_stringify(set);
|
||||
|
||||
for (var r in role_options)
|
||||
{
|
||||
if (sort_and_stringify(role_options[r]) === xyz) {
|
||||
if (sort_and_stringify(role_options[r]) === set) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user