- /// @todo We seem to need "Item::count" as function as well
- $r = q("SELECT COUNT(*) AS `total`
- FROM `item` %s
- WHERE %s AND `item`.`uid` = %d AND `item`.`type` = 'note'
- AND `contact`.`self` AND `item`.`id` = `item`.`parent` AND NOT `item`.`wall`
- $sql_extra ",
- item_joins(local_user()),
- item_condition(),
- intval(local_user())
- );
-
- if (DBM::is_result($r)) {
- $a->set_pager_total($r[0]['total']);
- $a->set_pager_itemspage(40);
- }
-
- $condition = ["`uid` = ? AND `type` = 'note' AND NOT `wall`
- AND `id` = `parent` AND `allow_cid` = ?",
- local_user(), '<' . $a->contact['id'] . '>'];