aboutsummaryrefslogtreecommitdiffstats
path: root/mod/manage.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/manage.php')
-rw-r--r--mod/manage.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/mod/manage.php b/mod/manage.php
index 3712be6f1..bc538e564 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -56,14 +56,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 +71,10 @@ 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)",
+ $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_deleted = 1 or xchan_orphan = 1)",
intval($channels[$x]['channel_id']),
intval(ABOOK_FLAG_PENDING),
- intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED),
- intval(XCHAN_FLAGS_DELETED|XCHAN_FLAGS_ORPHAN)
+ intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED)
);
if($intr)