From 800eec5bee9a63940234f94eb3c480a13de1b123 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 13 Jul 2015 17:48:11 -0700 Subject: merge from redmatrix --- include/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/Contact.php') diff --git a/include/Contact.php b/include/Contact.php index ad3580f42..6b5f9388c 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -333,7 +333,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { ); // if this was the default channel, set another one as default if($a->account['account_default_channel'] == $channel_id) { - $r = q("select channel_id from channel where channel_account_id = %d and not ( channel_pageflags & %d)>0 limit 1", + $r = q("select channel_id from channel where channel_account_id = %d and channel_removed = 0 limit 1", intval($a->account['account_id']), intval(PAGE_REMOVED)); if ($r) { -- cgit v1.2.3