From 1a074f459b77d69e5ad3a61f0fc4781b8ea50d74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 28 Jun 2011 21:56:48 +0200 Subject: [PATCH] Fixes name ordering. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/notifs.inc.php | 2 +- include/userset.inc.php | 30 +++++++++++++++--------------- modules/carnet.php | 2 +- modules/marketing.php | 2 +- modules/xnetgrp.php | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/notifs.inc.php b/include/notifs.inc.php index 4d8013c..d79de44 100644 --- a/include/notifs.inc.php +++ b/include/notifs.inc.php @@ -302,7 +302,7 @@ class Watch if (!isset($this->filters[$class])) { $event = $this->fetchEventWatch($class); $this->filters[$class] = new UserFilter($event->getCondition($this), - array($event->getOrder(), new UFO_Name(Profile::DN_SORT))); + array($event->getOrder(), new UFO_Name())); } return $this->filters[$class]; } diff --git a/include/userset.inc.php b/include/userset.inc.php index ae787f6..1a7e7d7 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -219,21 +219,21 @@ class MinificheView extends MixedView new UFO_Score(true), new UFO_ProfileUpdate(true), new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'pertinence')); } $this->addSort(new PlViewOrder( 'name', - array(new UFO_Name(Profile::DN_SORT)), + array(new UFO_Name()), 'nom')); $this->addSort(new PlViewOrder('promo', array( new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'promotion')); $this->addSort(new PlViewOrder('date_mod', array( new UFO_ProfileUpdate(true), new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'dernière modification')); parent::__construct($set, $params); } @@ -263,15 +263,15 @@ class MentorView extends MixedView { $this->entriesPerPage = 10; $this->addSort(new PlViewOrder('rand', array(new PFO_Random(S::i('uid'))), 'aléatoirement')); - $this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom')); + $this->addSort(new PlViewOrder('name', array(new UFO_Name()), 'nom')); $this->addSort(new PlViewOrder('promo', array( new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'promotion')); $this->addSort(new PlViewOrder('date_mod', array( new UFO_ProfileUpdate(true), new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'dernière modification')); parent::__construct($set, $params); } @@ -287,15 +287,15 @@ class GroupMemberView extends MixedView public function __construct(PlSet $set, array $params) { $this->entriesPerPage = 20; - $this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom')); + $this->addSort(new PlViewOrder('name', array(new UFO_Name()), 'nom')); $this->addSort(new PlViewOrder('promo', array( new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'promotion')); $this->addSort(new PlViewOrder('date_mod', array( new UFO_ProfileUpdate(true), new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'dernière modification')); parent::__construct($set, $params); } @@ -311,10 +311,10 @@ class ListMemberView extends MixedView public function __construct(PlSet $set, array $params) { $this->entriesPerPage = 100; - $this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom')); + $this->addSort(new PlViewOrder('name', array(new UFO_Name()), 'nom')); $this->addSort(new PlViewOrder('promo', array( new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'promotion')); parent::__construct($set, $params); } @@ -336,14 +336,14 @@ class TrombiView extends MixedView new UFO_Score(true), new UFO_ProfileUpdate(true), new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'pertinence')); } $set->addCond(new UFC_Photo()); - $this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom')); + $this->addSort(new PlViewOrder('name', array(new UFO_Name()), 'nom')); $this->addSort(new PlViewOrder('promo', array( new UFO_Promo(UserFilter::DISPLAY, true), - new UFO_Name(Profile::DN_SORT), + new UFO_Name(), ), 'promotion')); parent::__construct($set, $params); } diff --git a/modules/carnet.php b/modules/carnet.php index 3a126a1..8db0fc2 100644 --- a/modules/carnet.php +++ b/modules/carnet.php @@ -336,7 +336,7 @@ class CarnetModule extends PLModule Platal::session()->close(); - $order = array(new UFO_Name(Profile::LASTNAME), new UFO_Name(Profile::FIRSTNAME)); + $order = array(new UFO_Name()); if ($arg0 == 'promo') { $order = array_unshift($order, new UFO_Promo()); } else { diff --git a/modules/marketing.php b/modules/marketing.php index 08e46ca..33f131a 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -275,7 +275,7 @@ class MarketingModule extends PLModule $uf = new UserFilter(new PFC_And(new UFC_Promo('=', UserFilter::DISPLAY, $promo), new PFC_Not(new UFC_Registered()), new PFC_Not(new UFC_Dead())), - array(new UFO_Name(Profile::LASTNAME), new UFO_Name(Profile::FIRSTNAME))); + array(new UFO_Name())); $users = $uf->getUsers(); $page->assign('nonins', $users); } diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 41fe737..89477ee 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -374,7 +374,7 @@ class XnetGrpModule extends PLModule if (is_null($filename)) { $filename = $globals->asso('diminutif') . '.csv'; } - $users = $globals->asso()->getMembersFilter(null, new UFO_Name('directory_name'))->getUsers(); + $users = $globals->asso()->getMembersFilter(null, new UFO_Name())->getUsers(); pl_cached_content_headers('text/x-csv', 1); $page->changeTpl('xnetgrp/annuaire-csv.tpl', NO_SKIN); $page->assign('users', $users); -- 2.1.4