From a867dfba7bdd48be05dc2b4378b14012f8ea861a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Sat, 1 May 2010 00:24:39 +0200 Subject: [PATCH] Improve args for UFC_NameTokens MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit allow a single token ; a call to pl_flatten might be useful here Signed-off-by: Raphaël Barrois --- classes/userfilter.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/userfilter.php b/classes/userfilter.php index 3bee221..f9a5202 100644 --- a/classes/userfilter.php +++ b/classes/userfilter.php @@ -340,7 +340,11 @@ class UFC_NameTokens implements UserFilterCondition public function __construct($tokens, $flags = array(), $soundex = false, $exact = false) { - $this->tokens = $tokens; + if (is_array($tokens)) { + $this->tokens = $tokens; + } else { + $this->tokens = array($tokens); + } if (is_array($flags)) { $this->flags = $flags; } else { -- 2.1.4