Browse Source

Handle derivatives of itself. (#696)

* Handle derivatives of itself.

* More legibility.
pull/699/head
Jordan Dukart 7 years ago committed by Diego Pino Navarro
parent
commit
5c85f607bb
  1. 2
      includes/delete_datastream.form.inc

2
includes/delete_datastream.form.inc

@ -74,7 +74,7 @@ function islandora_datastream_to_purge(AbstractObject $object, $dsid) {
$hooks = islandora_invoke_hook_list(ISLANDORA_DERIVATIVE_CREATION_HOOK, $object->models, array($object));
$hook_filter = function ($hook_def) use ($dsid) {
return isset($hook_def['source_dsid']) && isset($hook_def['destination_dsid']) ?
$hook_def['source_dsid'] == $dsid :
($hook_def['source_dsid'] == $dsid && $hook_def['destination_dsid'] != $dsid) :
FALSE;
};
$hooks = array_filter($hooks, $hook_filter);

Loading…
Cancel
Save