-// $posts = q("SELECT COUNT(*) AS `local_posts` FROM `thread`
-// INNER JOIN `contact` ON `contact`.`id` = `thread`.`contact-id` AND `contact`.`uid` = `thread`.`uid`
-// WHERE `contact`.`self`");
- $posts = q("SELECT COUNT(*) AS local_posts FROM `thread` WHERE `thread`.`wall`");
-/*
- $posts = q("SELECT COUNT(*) AS local_posts FROM `thread`
- INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
- WHERE `thread`.`wall` AND NOT `thread`.`private` AND
- `thread`.`uid` != 0 AND LEFT(`item`.`body`, 6) != '[share' AND
- `thread`.`network` IN ('%s', '%s', '%s')",
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_DFRN));
-*/
-/*
- $posts = q("SELECT COUNT(*) AS `local_posts` FROM `item`
- INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `contact`.`self` and `item`.`id` = `item`.`parent` AND left(body, 6) != '[share' AND `item`.`network` IN ('%s', '%s', '%s')",
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_DFRN));
-*/
- if (!is_array($posts))
- $local_posts = -1;
- else
- $local_posts = $posts[0]["local_posts"];