Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
4665dd4b
Commit
4665dd4b
authored
Jun 26, 2018
by
Peter Spicer
Committed by
Robert Lyon
Aug 18, 2019
Browse files
Bug 1837194: Notify plugins when a notification is deleted
behatnotneeded Change-Id: Ife0d0351e012fc9eef5bc3c3fc535e64a628e96a
parent
76aea3bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/module/multirecipientnotification/indexin.json.php
View file @
4665dd4b
...
...
@@ -111,6 +111,16 @@ else if ($delete) {
db_begin
();
$countdeleted
=
0
;
$plugins
=
plugin_all_installed
();
foreach
(
$plugins
as
$key
=>
$plugin
)
{
$classname
=
generate_class_name
(
$plugin
->
plugintype
,
$plugin
->
name
);
safe_require
(
$plugin
->
plugintype
,
$plugin
->
name
);
if
(
!
is_callable
(
array
(
$classname
,
'notification_delete'
)))
{
unset
(
$plugins
[
$key
]);
}
}
foreach
(
$ids
as
$list
=>
$idsperlist
)
{
if
(
'module_multirecipient_notification'
===
$list
)
{
delete_messages_mr
(
$idsperlist
,
$USER
->
get
(
'id'
));
...
...
@@ -147,6 +157,11 @@ else if ($delete) {
}
}
$countdeleted
+=
(
$ids
)
?
count
(
$ids
)
:
count
(
$idsperlist
);
foreach
(
$plugins
as
$plugin
)
{
$classname
=
generate_class_name
(
$plugin
->
plugintype
,
$plugin
->
name
);
call_static_method
(
$classname
,
'notification_delete'
,
$idsperlist
,
$USER
->
get
(
'id'
),
$list
);
}
}
db_commit
();
$message
=
get_string
(
'deletednotifications1'
,
'activity'
,
$countdeleted
);
...
...
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