Added support for anonymous name generator to be a function in addition to being an array of names
This commit is contained in:
parent
b14d12bc0b
commit
302a27742a
@ -314,8 +314,12 @@ function loadConfig() {
|
||||
Cache::set('events_'.$boardsuffix, $events);
|
||||
}
|
||||
|
||||
if (is_array($config['anonymous']))
|
||||
if (is_array($config['anonymous'])) {
|
||||
$config['anonymous'] = $config['anonymous'][array_rand($config['anonymous'])];
|
||||
}
|
||||
else if (is_callable($config['anonymous'])){
|
||||
$config['anonymous'] = $config['anonymous']($boardsuffix);
|
||||
}
|
||||
|
||||
if ($config['debug']) {
|
||||
if (!isset($debug)) {
|
||||
|
Loading…
Reference in New Issue
Block a user