return false;
}
- if (!$this->empty) {
+ if (!$this->isEmpty()) {
$ufc = $this->buildUFC($ufb);
if ($ufc != null) {
$ufb->addCond($ufc);
} else {
$flags = array('public');
}
- if ($ufb->b('with_soundex')) {
- $soundex = true;
- $st = array();
- foreach ($strings as $string) {
- $st[] = soundex_fr($string);
- }
- } else {
- $soundex = false;
- $st = $strings;
- }
$exact =$ufb->b('exact');
- $conds->addChild(new UFC_NameTokens($st, $flags, $soundex, $exact));
+ $conds->addChild(new UFC_NameTokens($strings, $flags, $ufb->b('with_soundex'), $exact));
$ufb->addOrder(new UFO_Score());
}
}
}
+ public function isEmpty()
+ {
+ return parent::isEmpty() || $this->nwtype == 0;
+ }
+
public function buildUFC(UserFilterBuilder &$ufb)
{
return new UFC_Networking($this->nwtype, $this->val);