private $flags;
private $soundex;
private $exact;
+ private $general_type;
- public function __construct($tokens, $flags = array(), $soundex = false, $exact = false)
+ public function __construct($tokens, $flags = array(), $soundex = false, $exact = false, $general_type = '')
{
if (is_array($tokens)) {
$this->tokens = $tokens;
}
$this->soundex = $soundex;
$this->exact = $exact;
+ $this->general_type = $general_type;
}
public function buildCondition(PlFilter $uf)
if ($this->flags != null) {
$c .= XDB::format(' AND ' . $sub . '.flags IN {?}', $this->flags);
}
+ if ($this->general_type) {
+ $c .= XDB::format(' AND ' . $sub . '.general_type = {?}', $this->general_type);
+ }
$conds[] = $c;
}
if (count($foreign) > 0) {
$sub = $uf->addEmailRedirectFilter($foreign);
- $cond[] = XDB::format('ra' . $sub . '.redirect IS NOT NULL OR ra' . $sub . '.redirect IN {?}', $foreign);
+ $cond[] = XDB::format('ra' . $sub . '.redirect IS NOT NULL OR ra' . $sub . '.redirect IN {?} OR a.email IN {?}', $foreign, $foreign);
}
if (count($local) > 0) {
$sub = $uf->addAliasFilter($local);
{
$phone = new Phone(array('display' => $number));
$phone->format();
- $this->number = $phone->search();
+ $this->number = $phone->search;
$this->num_type = $num_type;
$this->phone_type = $phone_type;
}