Retrieves a single address in adresses dump.
authorStéphane Jacob <sj@m4x.org>
Mon, 12 Dec 2011 16:13:35 +0000 (17:13 +0100)
committerStéphane Jacob <sj@m4x.org>
Mon, 12 Dec 2011 16:13:35 +0000 (17:13 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/userset.inc.php

index 3b18a44..d0b2138 100644 (file)
@@ -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)