Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
070e7632
Commit
070e7632
authored
Dec 06, 2021
by
ludo
Browse files
Merge branch '20.03_TMA2' of
https://labs.maarch.org/maarch/MaarchCourrier
into 20.03_TMA2
parents
a9087b4d
3c43ea7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/contentManagement/controllers/MergeController.php
View file @
070e7632
...
...
@@ -256,8 +256,8 @@ class MergeController
$visibleNotes
=
array_reverse
(
$visibleNotes
);
$avisCount
=
1
;
foreach
(
$opinionWorkflow
as
$value
)
{
$user
=
UserModel
::
getBy
Id
([
'id
'
=>
$value
[
'item_id'
],
'select'
=>
[
'firstname'
,
'lastname'
]]);
$primaryEntity
=
UserModel
::
getPrimaryEntityById
([
'id'
=>
$
value
[
'item_
id'
],
'select'
=>
[
'entities.entity_label'
,
'users_entities.user_role as role'
]]);
$user
=
UserModel
::
getBy
Login
([
'login
'
=>
$value
[
'item_id'
],
'select'
=>
[
'
id'
,
'
firstname'
,
'lastname'
]]);
$primaryEntity
=
UserModel
::
getPrimaryEntityById
([
'id'
=>
$
user
[
'
id'
],
'select'
=>
[
'entities.entity_label'
,
'users_entities.user_role as role'
]]);
$processDate
=
null
;
if
(
!
empty
(
$value
[
'process_date'
]))
{
$processDate
=
' - '
.
TextFormatModel
::
formatDate
(
$value
[
'process_date'
]);
...
...
@@ -269,7 +269,7 @@ class MergeController
$avis
[
'entity'
.
$avisCount
]
=
$primaryEntity
[
'entity_label'
];
$avis
[
'note'
.
$avisCount
]
=
[];
foreach
(
$visibleNotes
as
$visibleNote
)
{
if
(
$visibleNote
[
'user_id'
]
===
$
value
[
'item_
id'
]
&&
strpos
(
$visibleNote
[
'note_text'
],
_AVIS_NOTE_PREFIX
)
===
0
)
{
if
(
$visibleNote
[
'user_id'
]
===
$
user
[
'
id'
]
&&
strpos
(
$visibleNote
[
'note_text'
],
_AVIS_NOTE_PREFIX
)
===
0
)
{
$avis
[
'note'
.
$avisCount
][]
=
trim
(
str_replace
(
_AVIS_NOTE_PREFIX
,
''
,
$visibleNote
[
'note_text'
]));
}
}
...
...
src/app/email/controllers/EmailController.php
View file @
070e7632
...
...
@@ -398,8 +398,8 @@ class EmailController
$attachmentTypes
=
AttachmentModel
::
getAttachmentsTypesByXML
();
$rawAttachments
=
AttachmentModel
::
get
([
'select'
=>
[
'res_id'
,
'title'
,
'identifier'
,
'attachment_type'
,
'typist'
,
'format'
,
'filesize'
,
'status'
,
'recipient_id'
,
'recipient_type'
],
'where'
=>
[
'res_id_master = ?'
,
'attachment_type not in (?)'
,
'status not in (?)'
],
'data'
=>
[
$args
[
'resId'
],
[
'signed_response'
],
[
'DEL'
,
'OBS'
]]
'where'
=>
[
'res_id_master = ?'
,
'status not in (?)'
],
'data'
=>
[
$args
[
'resId'
],
[
'DEL'
,
'OBS'
]]
]);
foreach
(
$rawAttachments
as
$attachment
)
{
$attachmentId
=
$attachment
[
'res_id'
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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