diff --git a/sites/all/modules/node_gallery/plugins/entityreference/selection/NodeGallerySelectionHandler.class.php b/sites/all/modules/node_gallery/plugins/entityreference/selection/NodeGallerySelectionHandler.class.php index a377dd8..ee3fe06 100755 --- a/sites/all/modules/node_gallery/plugins/entityreference/selection/NodeGallerySelectionHandler.class.php +++ b/sites/all/modules/node_gallery/plugins/entityreference/selection/NodeGallerySelectionHandler.class.php @@ -49,6 +49,7 @@ class NodeGallerySelectionHandler extends EntityReference_SelectionHandler_Gener protected function buildEntityFieldQuery($match = NULL, $match_operator = 'CONTAINS') { $query = new EntityFieldQuery(); $query->entityCondition('entity_type', $this->field['settings']['target_type']); + //->fieldCondition('field_status', 'value', 1); // Get target bundles from relationship type. $relationship_type = node_gallery_api_get_relationship_type(NULL, NULL, $this->field['settings']['handler_settings']['node_gallery_relationship_type']); $this->field['settings']['handler_settings']['target_bundles'] = $relationship_type->gallery_types; @@ -63,12 +64,14 @@ class NodeGallerySelectionHandler extends EntityReference_SelectionHandler_Gener } // Add a generic entity access tag to the query. - $query->addTag($this->field['settings']['target_type'] . '_access'); + //$query->addTag($this->field['settings']['target_type'] . '_access'); + $query->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT'); $query->addMetaData('op', 'update'); $query->addTag('entityreference'); $query->addMetaData('field', $this->field); $query->addMetaData('entityreference_selection_handler', $this); - + //drupal_set_message($this->field['settings']['target_type'] . '_access'); + // Add the sort option. if (!empty($this->field['settings']['handler_settings']['sort'])) { $sort_settings = $this->field['settings']['handler_settings']['sort'];