From: x2000habouzit Date: Wed, 17 Nov 2004 11:11:59 +0000 (+0000) Subject: closes #207 X-Git-Tag: xorg/old~918 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e1f62ff0405de849c1f734bf13c1525be8de2b24;p=platal.git closes #207 --- diff --git a/ChangeLog b/ChangeLog index 7392590..3c08739 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,10 @@ New : Bug/Wish : + * Bestalias: + - #207 : enable for the user the choice of his prefered alias. -MC + - #207 : use only the bestalias and the forlife in vcard and fiche. -MC + Fixes (from 0.9.2 branch) : diff --git a/htdocs/vcard.php b/htdocs/vcard.php index 9aebe3b..e543fd6 100644 --- a/htdocs/vcard.php +++ b/htdocs/vcard.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: vcard.php,v 1.14 2004-10-21 13:12:06 x2000habouzit Exp $ + $Id: vcard.php,v 1.15 2004-11-17 11:11:59 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -65,7 +65,7 @@ $vcard = mysql_fetch_assoc($result); $page->assign_by_ref('vcard', $vcard); mysql_free_result($result); -$page->mysql_assign("SELECT alias FROM aliases WHERE id={$vcard['user_id']} AND type!='a_vie' AND type!='homonyme'",'aliases'); +$page->mysql_assign("SELECT alias FROM aliases WHERE id={$vcard['user_id']} AND FIND_IN_SET('bestalias',flags)",'best'); $adr = $globals->db->query( "SELECT statut,adr1,adr2,adr3,cp,ville,gp.pays,gr.name,tel,fax, diff --git a/templates/fiche.tpl b/templates/fiche.tpl index d3a45b0..7ab8732 100644 --- a/templates/fiche.tpl +++ b/templates/fiche.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: fiche.tpl,v 1.25 2004-11-13 15:56:35 x2000habouzit Exp $ + $Id: fiche.tpl,v 1.26 2004-11-17 11:12:00 x2000habouzit Exp $ ***************************************************************************} {literal} @@ -53,8 +53,11 @@ function chgMainWinLoc( strPage ) {
(Fiche mise à jour le {$date|date_format:"%d %B %Y"})
- {$bestalias}@polytechnique.org
+ {$bestalias}@polytechnique.org + {if $bestalias neq $forlife} +
{$forlife}@polytechnique.org + {/if}
{if $nationalite}{$nationalite} - {/if}X {$promo} - Formation : {$applis|smarty:nodefaults}
{if $mobile}
Mobile : {$mobile}
{/if} diff --git a/templates/vcard.tpl b/templates/vcard.tpl index e29241e..5bfa058 100644 --- a/templates/vcard.tpl +++ b/templates/vcard.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: vcard.tpl,v 1.5 2004-10-29 15:46:57 x2000habouzit Exp $ + $Id: vcard.tpl,v 1.6 2004-11-17 11:12:00 x2000habouzit Exp $ ***************************************************************************} BEGIN:VCARD VERSION:3.0 @@ -27,10 +27,8 @@ FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.epouse` (`$vcard.nom`)"|q FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom`"|qp_enc} {/if} N;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc};{$vcard.prenom|qp_enc};{$vcard.epouse|qp_enc};; +EMAIL;TYPE=internet:{$best[0].alias}@polytechnique.org EMAIL;TYPE=internet:{$vcard.forlife}@polytechnique.org -{foreach from=$aliases item=a} -EMAIL;TYPE=internet:{$a.alias}@polytechnique.org -{/foreach} {if $vcard.mobile} TEL;TYPE=cell;ENCODING=QUOTED-PRINTABLE:{$vcard.mobile|qp_enc} {/if}