Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
}
$this->val = str_replace('*', '%', replace_accent($ufb->s($this->envfield)));
}
$this->val = str_replace('*', '%', replace_accent($ufb->s($this->envfield)));
}
protected function buildUFC(UserFilterBuilder &$ufb)
{
}
protected function buildUFC(UserFilterBuilder &$ufb)
{
- $conds = new PFC_And();
/** Admin: Email, IP
*/
if (S::admin() && strpos($s, '@') !== false) {
/** Admin: Email, IP
*/
if (S::admin() && strpos($s, '@') !== false) {
- $conds->addChild(new UFC_Email($s));
- return $conds;
+ return new UFC_Email($s);
} else if (S::admin() && preg_match('/[0-9]+\.([0-9]+|%)\.([0-9]+|%)\.([0-9]+|%)/', $s)) {
// TODO: create UFC_Ip
// $this->conds->addChild(new UFC_Ip($s));
} else if (S::admin() && preg_match('/[0-9]+\.([0-9]+|%)\.([0-9]+|%)\.([0-9]+|%)/', $s)) {
// TODO: create UFC_Ip
// $this->conds->addChild(new UFC_Ip($s));
+ $conds = new PFC_And();
+
/** Name
*/
$s = preg_replace('!\d+!', ' ', $s);
/** Name
*/
$s = preg_replace('!\d+!', ' ', $s);
}
$conds->addChild(new UFC_NameTokens($st, $flags, $soundex, $exact));
}
$conds->addChild(new UFC_NameTokens($st, $flags, $soundex, $exact));
- $ufb->addSort(new UFO_Score());
+ $ufb->addOrder(new UFO_Score());
} elseif (preg_match('!^<(\d{4})!', $r, $matches)) {
$conds->addChild(new UFC_Promo('<=', UserFilter::DISPLAY, 'X' . $matches[1]));
} elseif (preg_match('!^>(\d{4})!', $r, $matches)) {
} elseif (preg_match('!^<(\d{4})!', $r, $matches)) {
$conds->addChild(new UFC_Promo('<=', UserFilter::DISPLAY, 'X' . $matches[1]));
} elseif (preg_match('!^>(\d{4})!', $r, $matches)) {
- $this->conds->addChild(new UFC_Promo('>=', UserFilter::DISPLAY, 'X' . $matches[1]));
+ $conds->addChild(new UFC_Promo('>=', UserFilter::DISPLAY, 'X' . $matches[1]));