mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17151] Fix avatar ACP options
PHPBB3-17151
This commit is contained in:
parent
9401a59cfc
commit
2d0969e3e1
2 changed files with 20 additions and 6 deletions
|
@ -268,9 +268,16 @@ class manager
|
|||
{
|
||||
$config_name = $driver->get_config_name();
|
||||
|
||||
return array(
|
||||
'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
);
|
||||
return [
|
||||
'allow_avatar_' . $config_name => [
|
||||
'lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)),
|
||||
'validate' => 'bool',
|
||||
'type' => 'radio',
|
||||
'function' => 'build_radio',
|
||||
'params' => ['{CONFIG_VALUE}', '{KEY}', [1 => 'YES', 0 => 'NO']],
|
||||
'explain' => true
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -191,9 +191,16 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case
|
|||
{
|
||||
$avatar_settings = $this->manager->get_avatar_settings($this->avatar_foobar);
|
||||
|
||||
$expected_settings = array(
|
||||
'allow_avatar_' . get_class($this->avatar_foobar) => array('lang' => 'ALLOW_' . strtoupper(get_class($this->avatar_foobar)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
);
|
||||
$expected_settings = [
|
||||
'allow_avatar_' . get_class($this->avatar_foobar) => [
|
||||
'lang' => 'ALLOW_' . strtoupper(get_class($this->avatar_foobar)),
|
||||
'validate' => 'bool',
|
||||
'type' => 'radio',
|
||||
'function' => 'build_radio',
|
||||
'params' => ['{CONFIG_VALUE}', '{KEY}', [1 => 'YES', 0 => 'NO']],
|
||||
'explain' => true
|
||||
],
|
||||
];
|
||||
|
||||
$this->assertEquals($expected_settings, $avatar_settings);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue