From a21e6cffa184d78b6214a0306e2d2a7bbfc8ddb1 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 16 Feb 2013 15:51:55 -0800 Subject: start on channel_remove(), add some generic channel queries to the API layers --- include/security.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/security.php') diff --git a/include/security.php b/include/security.php index 8477ea6de..e691939fb 100644 --- a/include/security.php +++ b/include/security.php @@ -138,9 +138,10 @@ function change_channel($change_channel) { $ret = false; if($change_channel) { - $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel_id = %d and channel_account_id = %d limit 1", + $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel_id = %d and channel_account_id = %d and not ( channel_pageflags & %d) limit 1", intval($change_channel), - intval(get_account_id()) + intval(get_account_id()), + intval(PAGE_REMOVED) ); if($r) { $hash = $r[0]['channel_hash']; -- cgit v1.2.3