Commit a0744ba9 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Merge branch 'hotfix/2.0.1'

parents 88400d21 70a9babb
......@@ -566,10 +566,10 @@ class ArchiveTransfer extends abstractMessage
$this->processAppraisalRule($archive, $message->object->dataObjectPackage->managementMetadata->appraisalRule);
}
if (!empty($sedaArchive->management->accessRestrictionRule)) {
$this->processAccessRestrictionRule($archive, $sedaArchive->management->accessRule);
if (!empty($sedaArchive->management->accessRule)) {
$this->processAccessRule($archive, $sedaArchive->management->accessRule);
} else {
$this->processAccessRestrictionRule($archive, $message->object->dataObjectPackage->managementMetadata->accessRule);
$this->processAccessRule($archive, $message->object->dataObjectPackage->managementMetadata->accessRule);
}
$archive->descriptionClass = 'archivesPubliques/content';
......@@ -822,8 +822,8 @@ class ArchiveTransfer extends abstractMessage
//TODO OtherDescriptionData
if (!empty($sedaContentDescription->accessRestrictionRule)) {
$this->processAccessRestrictionRule($content, $sedaContentDescription->accessRestrictionRule);
if (!empty($sedaContentDescription->accessRule)) {
$this->processAccessRule($content, $sedaContentDescription->accessRule);
}
return $content;
......@@ -856,14 +856,14 @@ class ArchiveTransfer extends abstractMessage
return $custodialHistory;
}
protected function processAccessRestrictionRule($object, $sedaAccessRestrictionRule)
protected function processAccessRule($object, $sedaAccessRule)
{
if (isset($sedaAccessRestrictionRule->rule)) {
$object->accessRuleCode = (string) $sedaAccessRestrictionRule->rule[0]->value;
if (isset($sedaAccessRule->rule)) {
$object->accessRuleCode = (string) $sedaAccessRule->rule[0]->value;
}
if (isset($sedaAccessRestrictionRule->startDate)) {
$object->accessRuleStartDate = \laabs::cast((string) $sedaAccessRestrictionRule->startDate[0], 'datetime');
if (isset($sedaAccessRule->startDate)) {
$object->accessRuleStartDate = \laabs::cast((string) $sedaAccessRule->startDate[0], 'datetime');
}
}
......
......@@ -19,8 +19,8 @@ class Management
public $appraisalRule;
/**
* @var seda2/AccesRule
* @xpath seda:AccesRule
* @var seda2/AccessRule
* @xpath seda:AccessRule
*/
public $accesRule;
public $accessRule;
}
Supports Markdown
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