From: Pascal Corpet Date: Thu, 24 Feb 2005 00:33:57 +0000 (+0000) Subject: closes 289 : photo publique enlevee au lieu de photo point d'interrogation X-Git-Tag: xorg/old~267 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=32a579fde6823b7545c702427f0eeae0a7357c07;p=platal.git closes 289 : photo publique enlevee au lieu de photo point d'interrogation git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-493 --- diff --git a/htdocs/fiche.php b/htdocs/fiche.php index ead3201..cf2e4f0 100644 --- a/htdocs/fiche.php +++ b/htdocs/fiche.php @@ -73,7 +73,6 @@ if($user['x'] < 160){ $user['y'] = (integer)($user['y']*160/$user['x']); $user['x'] = 160; } -$page->assign('photo_url', $photo); // manage the public fiche $page->assign('logged', logged()); @@ -127,6 +126,9 @@ if (!logged()) { if ($user['medals_pub'] != 'public') { unset($user['medals']); } + if ($user['photo_pub'] != 'public') { + $photo = ""; + } } foreach($user['adr_pro'] as $i=>$pro) { if ($pro['entreprise'] == '' && $pro['fonction'] == '' @@ -140,6 +142,7 @@ if (count($user['adr_pro']) == 0) unset($user['adr_pro']); if (count($user['adr']) == 0) unset($user['adr']); $page->assign_by_ref('x', $user); +$page->assign('photo_url', $photo); // alias virtual $res = $globals->xdb->query( "SELECT alias diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 7960b69..9d84c7c 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -163,7 +163,7 @@ function &get_user_details($login, $from_uid = '') IF(gp.nat='',gp.pays,gp.nat) AS nationalite, gp.a2 AS iso3166, a.alias AS forlife, a2.alias AS bestalias, c.uid IS NOT NULL AS is_contact, - s.text AS section, p.x, p.y, + s.text AS section, p.x, p.y, p.pub AS photo_pub, m.expertise != '' AS is_referent FROM auth_user_md5 AS u diff --git a/templates/fiche.tpl b/templates/fiche.tpl index a72d1a3..3acb75d 100644 --- a/templates/fiche.tpl +++ b/templates/fiche.tpl @@ -97,7 +97,7 @@ function chgMainWinLoc( strPage ) { - Photo de {$x.forlife} + {if $photo_url}Photo de {$x.forlife}{/if} {min_auth level="cookie"} {if $x.section}Section : {$x.section}
{/if} {if $x.binets_join}Binet(s) : {$x.binets_join}
{/if}