-/* 2016-10-23: The old query will be kept until we are sure that the query above is a good and fast replacement
-
- $items = q("SELECT `item`.*, `item`.`id` AS `item_id` FROM `item`
- STRAIGHT_JOIN `thread` ON `thread`.`iid` = `item`.`parent`
- LEFT JOIN `item` AS `thritem` ON `thritem`.`uri`=`item`.`thr-parent` AND `thritem`.`uid`=`item`.`uid`
- WHERE `item`.`uid` = %d AND `item`.`received` > '%s' AND NOT `item`.`private` AND NOT `item`.`deleted`
- AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
- AND ((`item`.`wall` AND (`item`.`parent` = `item`.`id`))
- OR (`item`.`network` = '%s' AND ((`thread`.`network` IN ('%s', '%s')) OR (`thritem`.`network` IN ('%s', '%s')))) AND `thread`.`mention`)
- AND ((`item`.`owner-link` IN ('%s', '%s') AND (`item`.`parent` = `item`.`id`))
- OR (`item`.`author-link` IN ('%s', '%s')))
- ORDER BY `item`.`id` DESC
- LIMIT 0, 300",
- intval($owner["uid"]), dbesc($check_date), dbesc(NETWORK_DFRN),
- //dbesc(NETWORK_OSTATUS), dbesc(NETWORK_OSTATUS),
- //dbesc(NETWORK_OSTATUS), dbesc(NETWORK_OSTATUS),
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN),
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN),
- dbesc($owner["nurl"]), dbesc(str_replace("http://", "https://", $owner["nurl"])),
- dbesc($owner["nurl"]), dbesc(str_replace("http://", "https://", $owner["nurl"]))
- );
-*/