Added support for anonymous name generator to be a function in addition to being an array of names
This commit is contained in:
parent
b8b7380da0
commit
5efe6d272d
|
@ -299,8 +299,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