From: Stéphane Jacob Date: Mon, 12 Dec 2011 16:13:35 +0000 (+0100) Subject: Retrieves a single address in adresses dump. X-Git-Tag: xorg/1.1.5~55 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=67dd31d83f3088850cf267fb8e2dd34623ef5c5e;p=platal.git Retrieves a single address in adresses dump. Signed-off-by: Stéphane Jacob --- diff --git a/include/userset.inc.php b/include/userset.inc.php index 3b18a44..d0b2138 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -438,7 +438,8 @@ class AddressesView implements PlView FROM profile_addresses AS pa WHERE pa.pub IN ('public', 'ax') AND FIND_IN_SET('mail', pa.flags) AND pa.pid IN {?} ORDER BY pa.pid, NOT FIND_IN_SET('current', pa.flags), - FIND_IN_SET('secondary', pa.flags), pa.type = 'job') AS pa + FIND_IN_SET('secondary', pa.flags), pa.type = 'job' + LIMIT 1) AS pa INNER JOIN profiles AS p ON (pa.pid = p.pid) INNER JOIN profile_display AS pd ON (pd.pid = pa.pid) INNER JOIN profile_public_names AS pn ON (pn.pid = pa.pid)