Commit b1628198 authored by Cyril Vazquez's avatar Cyril Vazquez

FIX : container path not returned during "openContainer" step, causing wrong…

FIX : container path not returned during "openContainer" step, causing wrong storage path in archive metadata, though digitalResource addresses were OK
parent 17076f5f
......@@ -263,6 +263,8 @@ class cluster
throw \laabs::newException("digitalResource/clusterException", "Container %s counld not be opened.", 404, null, [$path]);
}
}
return $realPath;
}
/**
......
......@@ -210,13 +210,13 @@ class digitalResource
* @param string $path
* @param mixed $metadata
*
* @return void
* @return string
*/
public function openContainers($clusterId, $path, $metadata=null)
{
$cluster = $this->useCluster($clusterId, 'write', true);
$this->clusterController->openContainers($cluster, $path, $metadata);
return $this->clusterController->openContainers($cluster, $path, $metadata);
}
......
......@@ -895,8 +895,6 @@ trait archiveEntryTrait
// Add archiveId as container name in path
$path .= "/".$archive->archiveId;
$archive->storagePath = $path;
if (!$this->currentServiceLevel) {
if (isset($archive->serviceLevelReference)) {
$this->useServiceLevel('deposit', $archive->serviceLevelReference);
......@@ -913,7 +911,9 @@ trait archiveEntryTrait
}
}
$this->digitalResourceController->openContainers($this->currentServiceLevel->digitalResourceClusterId, $path, $metadata);
$storagePath = $this->digitalResourceController->openContainers($this->currentServiceLevel->digitalResourceClusterId, $path, $metadata);
$archive->storagePath = $storagePath;
}
/**
......
......@@ -108,8 +108,6 @@ eventInfo = {
if (value) {
$('<dt></dt>').text(key).appendTo(eventInfo);
$('<dd></dd>').html(value).css('word-break', 'break-all').appendTo(eventInfo);
} else {
console.log("cocuou");
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment