Add owner as exception to contact_ prefixing, it's used as a flag in searching.

Fixes ambiguous column error when filtering by owner and custom field.
This commit is contained in:
Nathan Gray 2014-07-15 16:26:44 +00:00
parent 061b4b9954
commit 31ad005a0b

View File

@ -100,8 +100,8 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
} }
continue; continue;
} }
// Custom fields & listed are not filtered with contact_ prefix // Custom fields & listed exceptions are not filtered with contact_ prefix
if(strpos($field, '#') !== 0 && !in_array($field, array('tid'))) if(strpos($field, '#') !== 0 && !in_array($field, array('tid','owner')))
{ {
$field = 'contact_'.$field; $field = 'contact_'.$field;
} }
@ -119,6 +119,10 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
{ {
$selection = explode(',',$options['selection']); $selection = explode(',',$options['selection']);
} }
if(!is_array($selection))
{
$selection = array();
}
$GLOBALS['egw_info']['flags']['currentapp'] = $old_app; $GLOBALS['egw_info']['flags']['currentapp'] = $old_app;
if(bo_merge::hasExportLimit($export_limit) && !$limit_exception) { if(bo_merge::hasExportLimit($export_limit) && !$limit_exception) {