X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fpayment%2Fmoney%2Fpaypal.inc.php;h=45ad720f88334f8a2406826b7cbb7d8e0d367460;hb=ce0b2c6f3fc4e7c524df32f56f1bc8e8d573bb1a;hp=08d83f4babd837b4ea4111ec2b4c4e60104b1c29;hpb=429e4a4b8eb428e9631513fc6bb053b4635c7729;p=platal.git diff --git a/modules/payment/money/paypal.inc.php b/modules/payment/money/paypal.inc.php index 08d83f4..45ad720 100644 --- a/modules/payment/money/paypal.inc.php +++ b/modules/payment/money/paypal.inc.php @@ -1,6 +1,6 @@ urlform = 'https://' . $globals->money->paypal_site . '/cgi-bin/webscr'; - $req = XDB::query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom - FROM auth_user_md5 - WHERE user_id = {?}", S::v('uid')); - $name = $req->fetchOneCell(); + $user = S::user(); + $name = $user->lastName(); $roboturl = str_replace("https://","http://",$globals->baseurl) . '/' . $platal->ns . "payment/paypal_return/" . S::v('uid') @@ -71,14 +69,15 @@ class PayPal 'email' => S::user()->bestEmail() ); + // XXX: waiting for port of adresses. $res = XDB::query( "SELECT a.text, l.name AS city, a.postalCode AS zip, a.countryiId AS country, IF(t1.display_tel != '', t1.display_tel, t2.display_tel) AS night_phone_b FROM auth_user_quick AS q LEFT JOIN profile_addresses AS a ON (q.user_id = a.pid AND FIND_IN_SET('current', a.flags)) - LEFT JOIN profile_phones AS t1 ON (t1.uid = a.uid AND t1.link_type = 'address' + LEFT JOIN profile_phones AS t1 ON (t1.pid = a.pid AND t1.link_type = 'address' AND t1.link_id = a.adrid) - LEFT JOIN profile_phones AS t2 ON (t2.uid = a.uid AND t2.link_type = 'user' + LEFT JOIN profile_phones AS t2 ON (t2.pid = a.pid AND t2.link_type = 'user' AND t2.link_id = 0) LEFT JOIN geoloc_localities AS l ON (l.id = a.localityId) WHERE q.user_id = {?}