Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
745f930b
Verified
Commit
745f930b
authored
Jul 08, 2019
by
Alexandre Morin
Browse files
fix (#10533) : problem of unique keys to unit identifier
parent
a03626f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/bundle/recordsManagement/Controller/archiveAccessTrait.php
View file @
745f930b
...
...
@@ -903,13 +903,19 @@ trait archiveAccessTrait
* Change the status of an archive
* @param mixed $archiveIds Identifiers of the archives to update
* @param string $status New status to set
* @param bool $isUnFreeze
*
* @return array Archives ids separate by successfully updated archives ['success'] and not updated archives ['error']
*/
public
function
setStatus
(
$archiveIds
,
$status
)
public
function
setStatus
(
$archiveIds
,
$status
,
$unFreeze
=
false
)
{
$statusList
=
[];
$statusList
[
'preserved'
]
=
array
(
'frozen'
,
'disposable'
,
'error'
,
'restituable'
,
'transferable'
);
if
(
$unFreeze
)
{
$statusList
[
'preserved'
]
=
array
(
'frozen'
,
'disposable'
,
'error'
,
'restituable'
,
'transferable'
);
}
else
{
$statusList
[
'preserved'
]
=
array
(
'disposable'
,
'error'
,
'restituable'
,
'transferable'
);
}
$statusList
[
'restituable'
]
=
array
(
'preserved'
);
$statusList
[
'restituted'
]
=
array
(
'restituable'
);
$statusList
[
'transfered'
]
=
array
(
'transferable'
);
...
...
src/bundle/recordsManagement/Controller/archiveDestructionTrait.php
View file @
745f930b
...
...
@@ -47,6 +47,12 @@ trait archiveDestructionTrait
foreach
(
$archiveChildrenIds
as
$archiveChildrenId
)
{
$archive
=
$this
->
sdoFactory
->
read
(
'recordsManagement/archive'
,
$archiveChildrenId
);
foreach
(
$archives
as
$a
)
{
if
(
$a
->
archiveId
==
$archive
->
archiveId
)
{
continue
2
;
}
}
$this
->
checkRights
(
$archive
);
$this
->
checkDisposalRights
(
$archive
)
;
...
...
src/bundle/recordsManagement/Controller/archiveModificationTrait.php
View file @
745f930b
...
...
@@ -351,7 +351,7 @@ trait archiveModificationTrait
$archives
[
$archiveId
]
=
$archive
;
}
$res
=
$this
->
setStatus
(
$archiveIds
,
'preserved'
);
$res
=
$this
->
setStatus
(
$archiveIds
,
'preserved'
,
true
);
for
(
$i
=
0
,
$count
=
count
(
$res
[
'success'
]);
$i
<
$count
;
$i
++
)
{
...
...
src/presentation/maarchRM/Presenter/medona/archiveModification.php
View file @
745f930b
...
...
@@ -304,7 +304,7 @@ class archiveModification
$this
->
json
->
message
=
sprintf
(
$this
->
json
->
message
,
$success
);
if
(
$echec
>
0
)
{
$message
=
'
%1$s restitution(s) can not be canceled.'
;
$message
=
'%1$s restitution(s) can not be canceled.'
;
$message
=
$this
->
translator
->
getText
(
$message
);
$message
=
sprintf
(
$message
,
$echec
);
...
...
src/presentation/maarchRM/Resources/locale/fr/audit/messages.po
View file @
745f930b
...
...
@@ -399,7 +399,7 @@ msgid "recordsManagement/archives/updateSetforrestitution"
msgstr "Paramétrer une archive pour la restitution"
msgid "recordsManagement/archives/updateDisposearchives"
msgstr "
Modification d'un dépôt d'archive
"
msgstr "
Demande de destruction
"
msgid "recordsManagement/archives/cancelDestruction"
msgstr "Annuler une destruction"
...
...
src/presentation/maarchRM/Resources/locale/fr/recordsManagement/messages.po
View file @
745f930b
...
...
@@ -746,10 +746,10 @@ msgstr "%1$s archive(s) ne sont pas dégelée(s)."
msgid "%1$s restitution(s) can not be validate(s)."
msgstr "%1$s restitution(s) ne sont pas validée(s)."
msgid "%1$s restitution(s) can not be canceled.
'
"
msgid "%1$s restitution(s) can not be canceled."
msgstr "%1$s restitution(s) ne sont pas annulée(s)."
msgid "%1$s destruction(s) can not be canceled.
'
"
msgid "%1$s destruction(s) can not be canceled."
msgstr "%1$s destruction(s) ne sont pas annulée(s)."
msgid "%1$s resource(s) can\'t be deleted."
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment