aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-10-02 19:42:21 -0700
committerzotlabs <mike@macgirvin.com>2018-10-02 19:42:21 -0700
commit7c1e99884cf9013d68dcce174e8f8d4f9dac49f7 (patch)
tree9768454b4a2e2e19ed6f2ea078785c046a0c4bd5
parent6f036bc77817e99351fcbe586122487c137a1898 (diff)
downloadvolse-hubzilla-7c1e99884cf9013d68dcce174e8f8d4f9dac49f7.tar.gz
volse-hubzilla-7c1e99884cf9013d68dcce174e8f8d4f9dac49f7.tar.bz2
volse-hubzilla-7c1e99884cf9013d68dcce174e8f8d4f9dac49f7.zip
do not propagate channel deletion for an already deleted channel.
-rw-r--r--include/channel.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php
index 7f49deb2e..74c213fcd 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -2533,6 +2533,12 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
if(! $local) {
+ if(intval($r[0]['channel_removed'])) {
+ // already removed. do not propagate deletion of a channel which
+ // may have been removed locally at some previous time.
+ return;
+ }
+
$r = q("update channel set channel_deleted = '%s', channel_removed = 1 where channel_id = %d",
dbesc(datetime_convert()),
intval($channel_id)