From 355a5f15886163ff52a1bf464d9bd64cf6bf07ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 5 Feb 2010 16:34:27 +0100 Subject: [PATCH] Fix the carnet MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- modules/carnet.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/carnet.php b/modules/carnet.php index 7c656cc..a19a50c 100644 --- a/modules/carnet.php +++ b/modules/carnet.php @@ -284,7 +284,11 @@ class CarnetModule extends PLModule break; } -/* $search = false; + $search = false; + $user = S::user(); + + require_once 'userset.inc.php'; + if ($action == 'search') { $action = $subaction; $subaction = $ssaction; @@ -294,16 +298,12 @@ class CarnetModule extends PLModule $base = 'carnet/contacts/search'; Platal::load('search', 'classes.inc.php'); - ThrowError::$throwHook = array($this, 'searchErrorHandler'); - $view = new SearchSet(true, false, "INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", "c2.uid = $uid"); + $view = new SearchSet(true, false, new UFC_Contact($user)); } else { $base = 'carnet/contacts'; - $view = new UserSet("INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", " c2.uid = $uid "); - }*/ + $view = new ProfileSet(new UFC_Contact($user)); + } - require_once 'userset.inc.php'; - $user = S::user(); - $view = new UserSet(new UFC_Contact($user)); $view->addMod('minifiche', 'Mini-fiches', true); $view->addMod('trombi', 'Trombinoscope', false, array('with_admin' => false, 'with_promo' => true)); // TODO: Reactivate when the new map is completed. -- 2.1.4