From: Stéphane Jacob Date: Sun, 29 May 2011 11:52:09 +0000 (+0200) Subject: Uses UFC_NameTokens instead of UFC_Name to perform search on names in xnet. X-Git-Tag: xorg/1.1.2~71 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3731beb2ec0ae6e363dd348011aa48ecc31106d6;p=platal.git Uses UFC_NameTokens instead of UFC_Name to perform search on names in xnet. Signed-off-by: Stéphane Jacob --- diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 4b5e9f6..41fe737 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -970,10 +970,10 @@ class XnetGrpModule extends PLModule list($lastname, $firstname) = str_replace(array('-', ' ', "'"), '%', array(Env::t('nom'), Env::t('prenom'))); $cond = new PFC_And(new PFC_Not(new UFC_Registered())); if (!empty($lastname)) { - $cond->addChild(new UFC_Name(Profile::LASTNAME, $lastname, UFC_Name::CONTAINS)); + $cond->addChild(new UFC_NameTokens($lastname, array(), false, false, Profile::LASTNAME)); } if (!empty($firstname)) { - $cond->addChild(new UFC_Name(Profile::FIRSTNAME, $firstname, UFC_Name::CONTAINS)); + $cond->addChild(new UFC_NameTokens($firstname, array(), false, false, Profile::FIRSTNAME)); } if (Env::t('promo')) { $cond->addChild(new UFC_Promo('=', UserFilter::DISPLAY, Env::t('promo')));