Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory-orchestrator
Commits
1a411f0a
Commit
1a411f0a
authored
1 month ago
by
Oana-Eliza Alexa
Browse files
Options
Download
Patches
Plain Diff
use utils
parent
ea4fc2c2
80-redesign-notifications-class
1 merge request
!76
Draft: Resolve "Redesign notifications class"
Pipeline
#32453
failed with stages
in 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/tasks/Notifications.php
+10
-13
plugins/tasks/Notifications.php
with
10 additions
and
13 deletions
+10
-13
plugins/tasks/Notifications.php
+
10
−
13
View file @
1a411f0a
...
@@ -6,11 +6,13 @@ class Notifications implements EndpointInterface
...
@@ -6,11 +6,13 @@ class Notifications implements EndpointInterface
private
TaskGateway
$gateway
;
private
TaskGateway
$gateway
;
private
string
$errorMessage
=
'No matching audited attributes with monitored attributes, safely removed!'
;
private
string
$errorMessage
=
'No matching audited attributes with monitored attributes, safely removed!'
;
private
Utils
$utils
;
private
Utils
$utils
;
private
MailUtils
$mailUtils
;
public
function
__construct
(
TaskGateway
$gateway
)
public
function
__construct
(
TaskGateway
$gateway
)
{
{
$this
->
gateway
=
$gateway
;
$this
->
gateway
=
$gateway
;
$this
->
utils
=
new
Utils
();
$this
->
utils
=
new
Utils
();
$this
->
mailUtils
=
new
MailUtils
();
}
}
/**
/**
...
@@ -320,19 +322,14 @@ class Notifications implements EndpointInterface
...
@@ -320,19 +322,14 @@ class Notifications implements EndpointInterface
foreach
(
$notifications
as
$data
)
{
foreach
(
$notifications
as
$data
)
{
$numberOfRecipients
=
count
(
$data
[
'mailForm'
][
'recipients'
]);
$numberOfRecipients
=
count
(
$data
[
'mailForm'
][
'recipients'
]);
$setFrom
=
$data
[
'mailForm'
][
'setFrom'
];
$mail_controller
=
new
\
FusionDirectory\Mail\MailLib
(
$recipients
=
$data
[
'mailForm'
][
'recipients'
];
$data
[
'mailForm'
][
'setFrom'
],
$body
=
$data
[
'mailForm'
][
'body'
];
NULL
,
$signature
=
$data
[
'mailForm'
][
'signature'
];
$data
[
'mailForm'
][
'recipients'
],
$subject
=
$data
[
'mailForm'
][
'subject'
];
$data
[
'mailForm'
][
'body'
],
$receipt
=
$data
[
'mailForm'
][
'receipt'
];
$data
[
'mailForm'
][
'signature'
],
$data
[
'mailForm'
][
'subject'
],
$mailSentResult
=
$this
->
mailUtils
->
sendMail
(
$setFrom
,
NULL
,
$recipients
,
$body
,
$signature
,
$subject
,
$receipt
,
NULL
);
$data
[
'mailForm'
][
'receipt'
],
NULL
);
$mailSentResult
=
$mail_controller
->
sendMail
();
$result
[]
=
$this
->
processMailResponseAndUpdateTasks
(
$mailSentResult
,
$data
,
$fdTasksConf
);
$result
[]
=
$this
->
processMailResponseAndUpdateTasks
(
$mailSentResult
,
$data
,
$fdTasksConf
);
// Verification anti-spam max mails to be sent and quit loop if matched.
// Verification anti-spam max mails to be sent and quit loop if matched.
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets