Browse Source

Merge pull request #452 from jordandukart/7.x-whacky-waving-inflatable-arm-flailing-caching

Force re-load an object when purging so we don't try to access things th...
pull/453/head
William Panting 11 years ago
parent
commit
4040b5997d
  1. 9
      includes/tuque_wrapper.inc

9
includes/tuque_wrapper.inc

@ -298,7 +298,14 @@ class IslandoraFedoraApiM extends FedoraApiM {
default: default:
$ret = parent::purgeDatastream($pid, $dsid, $params); $ret = parent::purgeDatastream($pid, $dsid, $params);
islandora_invoke_datastream_hooks(ISLANDORA_DATASTREAM_PURGED_HOOK, $object->models, $dsid, $object, $dsid); // We need to remove this object from the cache and reload it as
// Tuque may not have an updated copy. That is the datastream could
// still be present within the object even though it's purged out of
// Fedora.
$tuque = islandora_get_tuque_connection();
$tuque->cache->delete($pid);
$non_cached_object = islandora_object_load($pid);
islandora_invoke_datastream_hooks(ISLANDORA_DATASTREAM_PURGED_HOOK, $non_cached_object->models, $dsid, $non_cached_object, $dsid);
return $ret; return $ret;
} }
} }

Loading…
Cancel
Save