From: Raphaël Barrois Date: Fri, 30 Apr 2010 22:24:39 +0000 (+0200) Subject: Improve args for UFC_NameTokens X-Git-Tag: xorg/1.0.0~273 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a867dfba7bdd48be05dc2b4378b14012f8ea861a;p=platal.git Improve args for UFC_NameTokens allow a single token ; a call to pl_flatten might be useful here Signed-off-by: Raphaël Barrois --- 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 {