From: x2001corpet Date: Wed, 12 Oct 2005 06:35:56 +0000 (+0000) Subject: orth + bug 356 nom d'usage pour les paiements X-Git-Tag: xorg/0.9.9~111 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=237b6585ed66d5ede438ef7d820da8d4a6443f03;hp=8aea4c486703c07d38ef557bb14c5198e8ef1bd0;p=platal.git orth + bug 356 nom d'usage pour les paiements git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@93 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/money/cyberpaiement.inc.php b/include/money/cyberpaiement.inc.php index f9b3e26..ffe502c 100644 --- a/include/money/cyberpaiement.inc.php +++ b/include/money/cyberpaiement.inc.php @@ -54,6 +54,8 @@ class CyberPayment if (Cookie::has(session_name())) { $returnurl .= "?".SID; } + $req = $globals->xdb->query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom FROM auth_user_md5 WHERE user_id = {?}",Session::get('uid')); + $name = $req->fetchOneCell(); // on constuit la reference de la transaction $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id(); @@ -71,7 +73,7 @@ class CyberPayment 'CHAMP007' => $globals->baseurl, 'CHAMP008' => $pay->mail); $this->infos['client'] = Array( - 'CHAMP100' => Session::get('nom'), + 'CHAMP100' => $name, 'CHAMP101' => Session::get('prenom'), 'CHAMP102' => '.', 'CHAMP103' => '.', diff --git a/include/money/paypal.inc.php b/include/money/paypal.inc.php index 63634c5..bac5a75 100644 --- a/include/money/paypal.inc.php +++ b/include/money/paypal.inc.php @@ -52,6 +52,8 @@ class PayPal global $globals; $this->urlform = 'https://'.$globals->money->paypal_site.'/cgi-bin/webscr'; + $req = $globals->xdb->query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom FROM auth_user_md5 WHERE user_id = {?}",Session::get('uid')); + $name = $req->fetchOneCell(); $roboturl = str_replace("https://","http://",$globals->baseurl) ."/paiement/paypal_retour.php?uid=" @@ -69,7 +71,7 @@ class PayPal $info_client = Array( 'first_name' => Session::get('prenom'), - 'last_name' => Session::get('nom'), + 'last_name' => $name, 'email' => Session::get('bestalias').'@polytechnique.org'); $res = $globals->xdb->query( diff --git a/templates/profil.tpl b/templates/profil.tpl index 6a37f1e..7558397 100644 --- a/templates/profil.tpl +++ b/templates/profil.tpl @@ -30,8 +30,8 @@ {/foreach}

Tu peux consulter l'état actuel de ta fiche -tel qu'elle apparaîtra pour un camarade, -ou tel qu'elle apparaîtra à tout le monde.

+telle qu'elle apparaîtra pour un camarade, +ou telle qu'elle apparaîtra à tout le monde.

diff --git a/templates/profil/general.tpl b/templates/profil/general.tpl index 68c45c8..3ce7be6 100644 --- a/templates/profil/general.tpl +++ b/templates/profil/general.tpl @@ -148,7 +148,7 @@ -
+ Le service annuaire de l'AX met à jour l'annuaire papier à partir des informations que tu lui envoies. Tu peux choisir ici de récupérer directement ces données pour l'annuaire en ligne.