From 302a27742aac038582bc30cb11ca964aa018514e Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Fri, 16 Dec 2016 05:25:26 +0900 Subject: [PATCH] Added support for anonymous name generator to be a function in addition to being an array of names --- inc/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index ff7c129a..8ed65521 100755 --- a/inc/functions.php +++ b/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)) {