Skip to content
Snippets Groups Projects
Commit b5b779c6 authored by Cyril Vazquez's avatar Cyril Vazquez
Browse files

Merge branch 'fix/23822_list_depositors_in_search_form' into 'Support/2.9.X'

Fix/23822 list depositors in search form

See merge request maarch/archivesPubliques!294
parents 437f467a fbf2a08f
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,6 @@ class content
$this->view->addContentFile("archivesPubliques/contentDescription/search.html");
// $ownerOriginatorOrgs = $this->getOwnerOrgs($currentService, 'originator');
$orgController = \laabs::newController('organization/organization');
$ownerOriginatorOrgs = [];
......@@ -86,29 +85,6 @@ class content
$ownerDepositorOrgs = $this->getOwnerOrgs($currentService, 'depositor');
/*foreach ($ownerOriginatorOrgs as $ownerOriginatorOrgs) {
if (!isset($ownerOriginatorOrgs[(string) $ownerOriginatorOrgs->ownerOrgId])) {
$orgObject = \laabs::callService('organization/organization/read_orgId_', (string) $ownerOriginatorOrgs->ownerOrgId);
$ownerOriginatorOrgs[(string) $orgObject->orgId] = new \stdClass();
$ownerOriginatorOrgs[(string) $orgObject->orgId]->displayName = $orgObject->displayName;
$ownerOriginatorOrgs[(string) $orgObject->orgId]->originators = [];
}
$ownerOriginatorOrgs[(string) $orgObject->orgId]->originators[] = $originator;
}*/
/*foreach ($depositors as $depositor) {
if (!isset($ownerDepositorOrgs[(string) $depositor->ownerOrgId])) {
$orgObject = \laabs::callService('organization/organization/read_orgId_', (string) $depositor->ownerOrgId);
$ownerDepositorOrgs[(string) $orgObject->orgId] = new \stdClass();
$ownerDepositorOrgs[(string) $orgObject->orgId]->displayName = $orgObject->displayName;
$ownerDepositorOrgs[(string) $orgObject->orgId]->depositors = [];
}
$ownerDepositorOrgs[(string) $orgObject->orgId]->depositors[] = $depositor ;
}*/
$thesaurusNames = [
"corpname",
"famname",
......@@ -216,6 +192,7 @@ class content
// Depositor = all
|| $role == 'depositor'
) {
// Create org root
if (!isset($userOrgs[(string) $orgUnit->ownerOrgId])) {
$orgObject = \laabs::callService('organization/organization/read_orgId_', (string) $orgUnit->ownerOrgId);
......@@ -223,8 +200,9 @@ class content
$userOrgs[(string) $orgObject->orgId]->displayName = $orgObject->displayName;
$userOrgs[(string) $orgObject->orgId]->{$role} = [];
}
if (!in_array($orgUnit, $userOrgs[(string) $orgObject->orgId]->{$role})) {
$userOrgs[(string)$orgObject->orgId]->{$role}[] = $orgUnit;
// Add orgUnit to org root
if ((string) $orgUnit->ownerOrgId == (string) $orgObject->orgId && !in_array($orgUnit, $userOrgs[(string) $orgObject->orgId]->{$role})) {
$userOrgs[(string) $orgObject->orgId]->{$role}[] = $orgUnit;
}
}
}
......@@ -462,13 +440,6 @@ class content
$this->view->addContentFile("archivesPubliques/contentDescription/contentDescription.table.html");
$this->view->translate();
/*$keywordTypesDoc = \laabs::newService('dependency/xml/Document');
$keywordTypesDoc->load('bundle/seda/Resources/xsd/seda/v10/codes/seda_v1-0_keywordtype_code.xsd');
$keywordTypesXpath = \laabs::newService('dependency/xml/XPath', $keywordTypesDoc);
$keywordTypesXpath->registerNamespace('xsd', "http://www.w3.org/2001/XMLSchema");
$keywordTypesXpath->registerNamespace('ccts', "urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2");
*/
$keywordTypes = array(
'corpname' => 'Collectivité',
'famname' => 'Nom de famille',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment