Commit 869ef605 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Merge branch 'develop' into 'Support/2.6.X'

develop into Support/2.6.X

See merge request !427
parents 2b7f6e75 c07a3906
Pipeline #7033 canceled with stages
...@@ -276,12 +276,6 @@ class organization ...@@ -276,12 +276,6 @@ class organization
foreach ($organizationList as $organization) { foreach ($organizationList as $organization) {
$parentOrgId = (string)$organization->parentOrgId; $parentOrgId = (string)$organization->parentOrgId;
if ($user->ownerOrgId && $organization->ownerOrgId != $user->ownerOrgId) {
if (empty($parentOrgId) && $organization->orgId != $user->ownerOrgId) {
continue;
}
}
if (empty($parentOrgId) && $owner) { if (empty($parentOrgId) && $owner) {
$tree[] = $organization; $tree[] = $organization;
continue; continue;
...@@ -292,6 +286,12 @@ class organization ...@@ -292,6 +286,12 @@ class organization
continue; continue;
} }
if ($user->ownerOrgId && $organization->ownerOrgId != $user->ownerOrgId) {
if (empty($parentOrgId) && $organization->orgId != $user->ownerOrgId) {
continue;
}
}
if (!isset($organizationByParent[$parentOrgId])) { if (!isset($organizationByParent[$parentOrgId])) {
$organizationByParent[$parentOrgId] = array(); $organizationByParent[$parentOrgId] = array();
} }
......
...@@ -468,14 +468,17 @@ class log implements archiveDescriptionInterface ...@@ -468,14 +468,17 @@ class log implements archiveDescriptionInterface
return $path; return $path;
} }
public function contents ($type, $archiveId, $resourceId) { public function contents($type, $archiveId, $resourceId)
{
$archiveController = \laabs::newController('recordsManagement/archive'); $archiveController = \laabs::newController('recordsManagement/archive');
$res = $archiveController->consultation($archiveId, $resourceId); $res = $archiveController->consultation($archiveId, $resourceId);
$stream = (stream_get_contents($res->attachment->data));
$journal = $type . PHP_EOL; $journal = $type . PHP_EOL;
$journal .= $archiveId . ',' . $resourceId . PHP_EOL; $journal .= $archiveId . ',' . $resourceId . PHP_EOL;
$journal .= base64_decode($res->attachment->data); $journal .= $stream;
return $journal; return $journal;
} }
......
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