mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02: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:
committed by
Joas Schilling
parent
05c0d1ad17
commit
57617b048f
@@ -342,6 +342,8 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
{
|
||||
global $phpbb_root_path, $user;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$type = 0;
|
||||
$min = 1;
|
||||
$max = 2;
|
||||
@@ -516,6 +518,11 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$vars = array('cfg_array', 'config_name', 'config_definition', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.validate_config_vars', compact($vars)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user