forked from leftypol/leftypol
Added support for anonymous name generator to be a function in addition to being an array of names
This commit is contained in:
parent
ccfa70ad78
commit
a1b0ffdfdc
1 changed files with 5 additions and 1 deletions
|
@ -314,8 +314,12 @@ function loadConfig() {
|
||||||
Cache::set('events_'.$boardsuffix, $events);
|
Cache::set('events_'.$boardsuffix, $events);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($config['anonymous']))
|
if (is_array($config['anonymous'])) {
|
||||||
$config['anonymous'] = $config['anonymous'][array_rand($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 ($config['debug']) {
|
||||||
if (!isset($debug)) {
|
if (!isset($debug)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue