Browse Source

Work on https://github.com/Islandora-CLAW/CLAW/issues/1014. (#113)

* Work on https://github.com/Islandora-CLAW/CLAW/issues/1014.

* Fix coding style.

* Use $scheme, not 'fedora'.
pull/729/head
Mark Jordan 6 years ago committed by dannylamb
parent
commit
64d2ff0d0e
  1. 5
      src/Plugin/Action/EmitFileEvent.php

5
src/Plugin/Action/EmitFileEvent.php

@ -104,6 +104,11 @@ class EmitFileEvent extends EmitEvent {
$data = parent::generateData($entity); $data = parent::generateData($entity);
if (isset($flysystem_config[$scheme]) && $flysystem_config[$scheme]['driver'] == 'fedora') { if (isset($flysystem_config[$scheme]) && $flysystem_config[$scheme]['driver'] == 'fedora') {
// Fdora $uri for files may contain ':///' so we need to replace
// the three / with two.
if (strpos($uri, $scheme . ':///') !== FALSE) {
$uri = str_replace($scheme . ':///', $scheme . '://', $uri);
}
$data['fedora_uri'] = str_replace("$scheme://", $flysystem_config[$scheme]['config']['root'], $uri); $data['fedora_uri'] = str_replace("$scheme://", $flysystem_config[$scheme]['config']['root'], $uri);
} }
return $data; return $data;

Loading…
Cancel
Save