mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/events] Adding core.validate_config_vars event
Allows a MOD author to define additional "configuration types" and add the logic to validate these option types as well. PHPBB3-9550
This commit is contained in:
parent
05c0d1ad17
commit
57617b048f
1 changed files with 7 additions and 0 deletions
|
@ -342,6 +342,8 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||||
function validate_config_vars($config_vars, &$cfg_array, &$error)
|
function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $user;
|
global $phpbb_root_path, $user;
|
||||||
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
$type = 0;
|
$type = 0;
|
||||||
$min = 1;
|
$min = 1;
|
||||||
$max = 2;
|
$max = 2;
|
||||||
|
@ -516,6 +518,11 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$vars = array('cfg_array', 'config_name', 'config_definition', 'error');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.validate_config_vars', compact($vars)));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue