From 348b3844f6a0a4eb12fcb7d8733b0e2fb9fe9ae3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Wed, 23 Jun 2010 09:14:56 +0200 Subject: [PATCH] Fix visibility of nickname MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/profile.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/classes/profile.php b/classes/profile.php index fec4cfc..d75bf76 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -796,8 +796,9 @@ class Profile p.nationality1, p.nationality2, p.nationality3, IF (p.freetext_pub IN {?}, p.freetext, NULL) AS freetext, pe.entry_year, pe.grad_year, - IF ({?} IN {?}, pse.text, NULL) AS section, - pn_f.name AS firstname, pn_l.name AS lastname, pn_n.name AS nickname, + IF ({?}, pse.text, NULL) AS section, + pn_f.name AS firstname, pn_l.name AS lastname, + IF( {?}, pn_n.name, NULL) AS nickname, IF(pn_uf.name IS NULL, pn_f.name, pn_uf.name) AS firstname_ordinary, IF(pn_ul.name IS NULL, pn_l.name, pn_ul.name) AS lastname_ordinary, pd.yourself, pd.promo, pd.short_name, pd.directory_name AS full_name, @@ -829,8 +830,10 @@ class Profile GROUP BY p.pid ' . $order, $visibility->levels(), - ProfileVisibility::VIS_PRIVATE, $visibility->levels(), - $visibility->levels(), $visibility->levels(), + $visibility->isVisible(ProfileVisibility::VIS_PRIVATE), + $visibility->isVisible(ProfileVisibility::VIS_PRIVATE), + $visibility->levels(), + $visibility->levels(), $pids ); return new ProfileIterator($it, $pids, $fields, $visibility); -- 2.1.4