Browse Source

Added support for anonymous name generator to be a function in addition to being an array of names

pull/40/head
Benjamin Southall 6 years ago
parent
commit
302a27742a
  1. 6
      inc/functions.php

6
inc/functions.php

@ -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…
Cancel
Save