Details
Description
If a contact has more than one website, they appear twice on all-primary-field exports of event listings. Replicated on WordPress 4.4 demo.
This is down to /CRM/Contact/BAO/Query.php. Specifically:
case 'civicrm_website':
$from .= " $side JOIN civicrm_website ON contact_a.id = civicrm_website.contact_id and website_type_id = 21 ";
Which creates a row for every entry in civicrm_website. I was going to fix it by checking on is_primary (as happens for phone, email etc), but the civicrm_website table doesn't have that field.
It seems like this might be affecting other queries as I don't think the code is specifically for CiviEvents, but I'm not familiar enough with Civi structures to figure it out. Either way, I don't want to start hacking about with something so important, so figured I'd turn this one over to the experts.