diff options
Diffstat (limited to 'mod/manage.php')
-rw-r--r-- | mod/manage.php | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/mod/manage.php b/mod/manage.php index 3712be6f1..c86db55e8 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -41,9 +41,8 @@ function manage_content(&$a) { $channels = null; if(local_channel()) { - $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel.channel_account_id = %d and not ( channel_pageflags & %d )>0 order by channel_name ", - intval(get_account_id()), - intval(PAGE_REMOVED) + $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel.channel_account_id = %d and channel_removed = 0 order by channel_name ", + intval(get_account_id()) ); $account = get_app()->get_account(); @@ -56,14 +55,14 @@ function manage_content(&$a) { $channels[$x]['default_links'] = '1'; - $c = q("SELECT id, item_restrict, item_flags FROM item - WHERE item_restrict = 0 and item_unseen = 1 and uid = %d", + $c = q("SELECT id, item_wall FROM item + WHERE item_unseen = 1 and uid = %d " . item_normal(), intval($channels[$x]['channel_id']) ); if($c) { foreach ($c as $it) { - if($it['item_flags'] & ITEM_WALL) + if(intval($it['item_wall'])) $channels[$x]['home'] ++; else $channels[$x]['network'] ++; @@ -71,11 +70,8 @@ function manage_content(&$a) { } - $intr = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d)>0 and not ((abook_flags & %d)>0 or (xchan_flags & %d)>0)", - intval($channels[$x]['channel_id']), - intval(ABOOK_FLAG_PENDING), - intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED), - intval(XCHAN_FLAGS_DELETED|XCHAN_FLAGS_ORPHAN) + $intr = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and abook_pending = 0 and abook_self = 0 and abook_ignored = 0 and xchan_deleted = 0 and xchan_orphan = 0 ", + intval($channels[$x]['channel_id']) ); if($intr) @@ -127,9 +123,8 @@ function manage_content(&$a) { } } - $r = q("select count(channel_id) as total from channel where channel_account_id = %d and not ( channel_pageflags & %d )>0", - intval(get_account_id()), - intval(PAGE_REMOVED) + $r = q("select count(channel_id) as total from channel where channel_account_id = %d and channel_removed = 0", + intval(get_account_id()) ); $limit = account_service_class_fetch(get_account_id(),'total_identities'); if($limit !== false) { |