diff options
author | zotlabs <mike@macgirvin.com> | 2018-10-03 02:42:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-10-05 11:45:09 +0200 |
commit | 22fbb512d5be1d95cae7c59f967b978d59557a5a (patch) | |
tree | 1ea60ead8c06ca4af1d95ebc5c1e3722134ee88b | |
parent | 2acfa7e5255e4a107c0f1c91170e4c24e3fea5bc (diff) | |
download | volse-hubzilla-22fbb512d5be1d95cae7c59f967b978d59557a5a.tar.gz volse-hubzilla-22fbb512d5be1d95cae7c59f967b978d59557a5a.tar.bz2 volse-hubzilla-22fbb512d5be1d95cae7c59f967b978d59557a5a.zip |
do not propagate channel deletion for an already deleted channel.
(cherry picked from commit 7c1e99884cf9013d68dcce174e8f8d4f9dac49f7)
-rw-r--r-- | include/channel.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php index 33e438e53..6a934cb82 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) |