mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 04:48:53 +00:00
[ticket/11314] Use return variable instead of overusing the return keyword
Use a return variable and modify it to our needs. PHPBB3-11314
This commit is contained in:
parent
0fc863c68a
commit
f7af4eb2e9
1 changed files with 5 additions and 4 deletions
|
@ -173,18 +173,19 @@ phpbb.ajaxify({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
filter: function (data) {
|
filter: function (data) {
|
||||||
var action = $('#quick-mod-select').val();
|
var action = $('#quick-mod-select').val();
|
||||||
|
var ret = false;
|
||||||
|
|
||||||
if (action === 'make_normal') {
|
if (action === 'make_normal') {
|
||||||
return $(this).find('select option[value="make_global"]').length > 0;
|
ret = $(this).find('select option[value="make_global"]').length > 0;
|
||||||
} else if (action === 'lock' || action === 'unlock') {
|
} else if (action === 'lock' || action === 'unlock') {
|
||||||
return true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') {
|
if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') {
|
||||||
return true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return ret;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue