*/
public static function defaultReturnProperty($exportMode) {
// hack to add default return property based on export mode
+ $property = NULL;
if ($exportMode == CRM_Export_Form_Select::CONTRIBUTE_EXPORT) {
$property = 'contribution_id';
}
elseif ($exportMode == CRM_Export_Form_Select::ACTIVITY_EXPORT) {
$property = 'activity_id';
}
- elseif ($exportMode == CRM_Export_Form_Select::CONTACT_EXPORT) {
- $property = 'contact_id';
- }
return $property;
}
}
}
}
- $returnProperties[self::defaultReturnProperty($exportMode)] = 1;
+ if (!empty(self::defaultReturnProperty($exportMode))) {
+ $returnProperties[self::defaultReturnProperty($exportMode)] = 1;
+ }
}
else {
$primary = TRUE;
list($select, $from, $where, $having) = $query->query();
if ($mergeSameHousehold == 1) {
- if (!$returnProperties['id']) {
+ if (empty($returnProperties['id'])) {
$returnProperties['id'] = 1;
}