mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
[ticket/17093] Use acp twig macro for display of acp board setting
PHPBB3-17093
This commit is contained in:
parent
042feffed8
commit
73806f9342
2 changed files with 23 additions and 4 deletions
|
@ -1051,11 +1051,30 @@ class acp_board
|
||||||
/**
|
/**
|
||||||
* Board disable access for which group: admins: 0; plus global moderators: 1 and plus all moderators: 2
|
* Board disable access for which group: admins: 0; plus global moderators: 1 and plus all moderators: 2
|
||||||
*/
|
*/
|
||||||
function board_disable_access($value, $key = '')
|
public function board_disable_access($value, $key = '') : array
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
return '<option value="0"' . (($value == 0) ? ' selected="selected"' : '') . '>' . $user->lang['DISABLE_BOARD_ACCESS_ADMIN'] . '</option><option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DISABLE_BOARD_ACCESS_ADMIN_GLOB_MODS'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['DISABLE_BOARD_ACCESS_ADMIN_ALL_MODS'] . '</option>';
|
return [
|
||||||
|
[
|
||||||
|
'tag' => 'select',
|
||||||
|
'value' => 0,
|
||||||
|
'selected' => ($value == 0) ? ' selected="selected"' : '',
|
||||||
|
'label' => $user->lang['DISABLE_BOARD_ACCESS_ADMIN'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'tag' => 'select',
|
||||||
|
'value' => 1,
|
||||||
|
'selected' => ($value == 1) ? ' selected="selected"' : '',
|
||||||
|
'label' => $user->lang['DISABLE_BOARD_ACCESS_ADMIN_GLOB_MODS'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'tag' => 'select',
|
||||||
|
'value' => 2,
|
||||||
|
'selected' => ($value == 2) ? ' selected="selected"' : '',
|
||||||
|
'label' => $user->lang['DISABLE_BOARD_ACCESS_ADMIN_ALL_MODS'],
|
||||||
|
]
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,14 +11,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpbb\db\migration\data\v33x;
|
namespace phpbb\db\migration\data\v400;
|
||||||
|
|
||||||
class add_disable_board_access_config extends \phpbb\db\migration\migration
|
class add_disable_board_access_config extends \phpbb\db\migration\migration
|
||||||
{
|
{
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'\phpbb\db\migration\data\v33x\v3310',
|
'\phpbb\db\migration\data\v400\dev',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue