Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hubzilla
core
Commits
492665a8
Commit
492665a8
authored
Jun 07, 2017
by
Zot
Committed by
Mario
Jun 08, 2017
Browse files
provide hook when deleting a connection - we need this to clean up dangling PuSH subscriptions
parent
55836e8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/hooklist.bb
View file @
492665a8
...
...
@@ -118,6 +118,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/connect_premium]connect_premium[/zrl]
Called when connecting to a premium channel
[zrl=[baseurl]/help/hook/connection_remove]connection_remove[/zrl]
Called when deleting/removing a connection
[zrl=[baseurl]/help/hook/connector_settings]connector_settings[/zrl]
Called when posting to the features/addon settings page
...
...
include/connections.php
View file @
492665a8
...
...
@@ -341,6 +341,11 @@ function contact_remove($channel_id, $abook_id) {
logger
(
'removing contact '
.
$abook_id
.
' for channel '
.
$channel_id
,
LOGGER_DEBUG
);
$x
=
[
'channel_id'
=>
$channel_id
,
'abook_id'
=>
$abook_id
];
call_hooks
(
'connection_remove'
,
$x
);
$archive
=
get_pconfig
(
$channel_id
,
'system'
,
'archive_removed_contacts'
);
if
(
$archive
)
{
q
(
"update abook set abook_archived = 1 where abook_id = %d and abook_channel = %d"
,
...
...
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