Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19545: Revert CRM-18776 to get back missing custom fields #417

Merged
merged 1 commit into from
Jan 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions modules/views/components/civicrm.core.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2931,19 +2931,13 @@ function _civicrm_core_data(&$data, $enabled) {
),
);


// Pull in all the Custom fields
$query = "select id, extends, extends_entity_column_value, style from civicrm_custom_group where is_active = 1";

$dao = CRM_Core_DAO::executeQuery($query);


while ($dao->fetch()) {
// call getTree using $dao->id as groupID, $dao->extends as entityType, with possible subtypes in $dao->extends_entity_column_value
$extendsContactSubtype = (('Contact' === $dao->extends) && !empty($dao->extends_entity_column_value));
$contactSubtypes = !$extendsContactSubtype ? NULL : array_filter(explode(CRM_Core_DAO::VALUE_SEPARATOR, $dao->extends_entity_column_value));
$contactSubtypes = empty($contactSubtypes) ? NULL : $contactSubtypes;
$data = civicrm_views_custom_data_cache($data, $dao->extends, $dao->id, $contactSubtypes);
// Call getTree using $dao->id as groupID, $dao->extends as entityType, with possible subtypes in $dao->extends_entity_column_value
$data = civicrm_views_custom_data_cache($data, $dao->extends, $dao->id, $dao->extends_entity_column_value);
}
}