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
MaarchCourrier
Commits
eab1f62e
Commit
eab1f62e
authored
Oct 15, 2021
by
Mathieu
Browse files
FIX #18428 7:00
parent
b6e37338
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/external/messageExchange/controllers/SendMessageExchangeController.php
View file @
eab1f62e
...
...
@@ -28,6 +28,7 @@ use Note\models\NoteModel;
use
Resource\controllers\ResController
;
use
Resource\models\ResModel
;
use
Respect\Validation\Validator
;
use
SrcCore\models\PasswordModel
;
use
SrcCore\models\TextFormatModel
;
use
Status\models\StatusModel
;
use
User\models\UserModel
;
...
...
@@ -237,6 +238,18 @@ class SendMessageExchangeController
}
else
{
$ArchivalAgencyCommunicationType
[
'type'
]
=
'url'
;
$ArchivalAgencyCommunicationType
[
'value'
]
=
rtrim
(
$aArchivalAgencyCommunicationType
[
'uri'
],
"/"
);
if
(
strrpos
(
$ArchivalAgencyCommunicationType
[
'value'
],
"http://"
)
!==
false
)
{
$url
=
str_replace
(
"http://"
,
""
,
$ArchivalAgencyCommunicationType
[
'value'
]);
$prefix
=
"http://"
;
}
elseif
(
strrpos
(
$ArchivalAgencyCommunicationType
[
'value'
],
"https://"
)
!==
false
)
{
$url
=
str_replace
(
"https://"
,
""
,
$ArchivalAgencyCommunicationType
[
'value'
]);
$prefix
=
"https://"
;
}
else
{
return
$response
->
withStatus
(
403
)
->
withJson
([
'errors'
=>
'http or https missing'
]);
}
$login
=
$aArchivalAgencyCommunicationType
[
'login'
];
$password
=
PasswordModel
::
decrypt
([
'cryptedPassword'
=>
$aArchivalAgencyCommunicationType
[
'password'
]]);
$ArchivalAgencyCommunicationType
[
'value'
]
=
$prefix
.
$login
.
':'
.
$password
.
'@'
.
$url
;
}
}
$ArchivalAgencyContactInformations
=
ContactModel
::
getById
([
'select'
=>
[
'*'
],
'id'
=>
$contactId
]);
...
...
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