Skip to content

Commit

Permalink
Remove or replace outdated dereferencing methods (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrydallacroce authored and fmizzell committed Oct 26, 2019
1 parent e259fb6 commit 783f4fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions modules/custom/dkan_data/dkan_data.module
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ function dkan_data_node_load(array $entities) {
* @return int
* One of the int constants from class ValueReferencer:
* - DEREFERENCE_OUTPUT_DEFAULT = 0
* - DEREFERENCE_OUTPUT_MINIMAL = 1
* - DEREFERENCE_OUTPUT_VERBOSE = 2
* - DEREFERENCE_OUTPUT_REFERENCE_IDS = 2
*/
function dereferencing_method() : int {
$allowed_methods = [
Expand Down
4 changes: 2 additions & 2 deletions modules/custom/dkan_datastore/src/Drush.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function import($uuid, $deferred = FALSE) {

try {
// Load metadata with both identifier and data for this request.
drupal_static('dkan_data_dereference_method', ValueReferencer::DEREFERENCE_OUTPUT_VERBOSE);
drupal_static('dkan_data_dereference_method', ValueReferencer::DEREFERENCE_OUTPUT_REFERENCE_IDS);

$this->datastoreService->import($uuid, $deferred);
}
Expand Down Expand Up @@ -104,7 +104,7 @@ public function list() {
public function drop($uuid) {
try {
// Load metadata with both identifier and data for this request.
drupal_static('dkan_data_dereference_method', ValueReferencer::DEREFERENCE_OUTPUT_VERBOSE);
drupal_static('dkan_data_dereference_method', ValueReferencer::DEREFERENCE_OUTPUT_REFERENCE_IDS);
$this->datastoreService->drop($uuid);
}
catch (\Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion modules/custom/dkan_metastore/src/Controller/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function getResources($schema_id, $identifier) {
try {
// Load this dataset's metadata with both data and identifiers.
if (function_exists('drupal_static')) {
drupal_static('dkan_data_dereference_method', ValueReferencer::DEREFERENCE_OUTPUT_VERBOSE);
drupal_static('dkan_data_dereference_method', ValueReferencer::DEREFERENCE_OUTPUT_REFERENCE_IDS);
}

$json = $this->getEngine($schema_id)
Expand Down

0 comments on commit 783f4fe

Please sign in to comment.