From: Raphaël Barrois Date: Fri, 5 Feb 2010 15:34:27 +0000 (+0100) Subject: Fix the carnet X-Git-Tag: xorg/1.0.0~332^2~247 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=355a5f15886163ff52a1bf464d9bd64cf6bf07ca;p=platal.git Fix the carnet Signed-off-by: Raphaël Barrois --- 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.